diff options
author | Eric V. Smith <ericvsmith@users.noreply.github.com> | 2018-05-15 01:00:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-15 01:00:18 (GMT) |
commit | 046d311654eb15ccc8f471290334f7ac6aad5f15 (patch) | |
tree | bd31136c8479e3b4bcec0061cfa3d134767e6506 | |
parent | 735abadd5bd91db4a9e6f4311969b0afacca0a1a (diff) | |
download | cpython-046d311654eb15ccc8f471290334f7ac6aad5f15.zip cpython-046d311654eb15ccc8f471290334f7ac6aad5f15.tar.gz cpython-046d311654eb15ccc8f471290334f7ac6aad5f15.tar.bz2 |
Remove accidentally checked in files. (GH-6835)
-rw-r--r-- | f.py | 12 | ||||
-rw-r--r-- | j.py | 15 | ||||
-rw-r--r-- | t.py | 20 | ||||
-rw-r--r-- | x.py | 31 |
4 files changed, 0 insertions, 78 deletions
@@ -1,12 +0,0 @@ -from __future__ import annotations -from dataclasses import dataclass -from typing import List -from typing import ClassVar as CV - -@dataclass -class A: - a: List[str] - -@dataclass -class B(A): - b: CV[int] @@ -1,15 +0,0 @@ - -class X: - def __init__(self, value): - self.value = value - def __str__(self): - return str(self.value) - def __format__(self, fmt): - assert fmt[0] == '=' - self.value = eval(fmt[1:]) - return '' - -x = X(3) -print(x) -f'{x:=4}' # Behold! -print(x) @@ -1,20 +0,0 @@ -from dataclasses import * - -class D: - """A descriptor class that knows its name.""" - def __set_name__(self, owner, name): - self.name = name - def __get__(self, instance, owner): - if instance is not None: - return 1 - return self - -from dataclasses import * - -@dataclass -class C: - d: int = field(default=D(), init=False) - -@dataclass -class E(C): - e: int = field(default=D(), init=False) @@ -1,31 +0,0 @@ -#from __future__ import annotations -from typing import ClassVar, Dict, get_type_hints -from dataclasses import * - -class Starship: - stats: ClassVar[Dict[str, int]] = {} - -#print(get_type_hints(Starship)) - -#class A: -# a: Dict[int, C] - -#print(get_type_hints(A)) - -cv = [ClassVar[int]] - -@dataclass -class C: - CVS = [ClassVar[str]] - a: cv[0] - b: 'C' - c: 'CVS[0]' - x: 'ClassVar["int"]' - y: 'ClassVar[C]' - -print() -print(C.__annotations__) -print(C.__dataclass_fields__) - - -#print(get_type_hints(C)) |