[Python-Dev] What's missing in PEP-484 (Type hints) (original) (raw)
Dima Tisnek dimaqq at gmail.com
Thu May 7 16:28:37 CEST 2015
- Previous message (by thread): [Python-Dev] What's missing in PEP-484 (Type hints)
- Next message (by thread): [Python-Dev] What's missing in PEP-484 (Type hints)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
# plain data user1 = dict(id=123, # always int name="uuu", # always str ...) # other fields possible smth = [42, "xx", ...] (why not namedtuple? b/c extensible, mutable) At least one PHP IDE allows to annotate PDO. Perhaps it's just bad taste in Python? Or is there a valid use-case? Most (all?) of this is actually mentioned in the PEP: https://www.python.org/dev/peps/pep-0484/#type-comments
The question was about mixed containers, e.g.: x = [12, "Jane"] y = [13, "John", 99.9]
There first element is always int, second always str, and rest is variable.
- Previous message (by thread): [Python-Dev] What's missing in PEP-484 (Type hints)
- Next message (by thread): [Python-Dev] What's missing in PEP-484 (Type hints)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]