[issue34632] Port importlib_metadata to Python 3.8

2019-10-11 Thread Arne Recknagel
Arne Recknagel added the comment: I just learned that metadata is stored as an email, and changing the format was rejected in PEP 426. Be that as it may, if it isn't too much of an issue it might still be something that should be hidden from users of the module. Noone wants to know

[issue34632] Port importlib_metadata to Python 3.8

2019-10-11 Thread Arne Recknagel
Arne Recknagel added the comment: Is there a reason the object returned by importlib.metadata.metadata is an EmailMessage and not a dict? If it quacks like a duck it should be a duck, no? -- nosy: +arne ___ Python tracker <https://bugs.python.

[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-26 Thread Arne Recknagel
Arne Recknagel added the comment: Alright, fair enough -- ___ Python tracker <https://bugs.python.org/issue38277> ___ ___ Python-bugs-list mailing list Unsub

[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-26 Thread Arne Recknagel
Arne Recknagel added the comment: I'll keep shouting from the sidelines, if it's ok. Is the following behavior still desired >>> [z := x for x in 'foo'] # valid over forcing parentheses here as well? >>> [(z := x) for x in 'foo'] # also valid, but redundant parent

[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Arne Recknagel
Arne Recknagel added the comment: Nothing in particular, only that I expected it to follow the same rules as regular if-blocks. It would be nice to have, since it'd be one less thing to keep in mind. > There are some tricky issues in this particular bit of syntax [...] It looks l

[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Arne Recknagel
New submission from Arne Recknagel : All code is run on python build from the current 3.8 branch. The following doesn't work: >>> [x for x in 'foo' if y := True] File "", line 1 [x for x in 'foo' if y := True] ^ SyntaxError: in

[issue37948] get_type_hints fails if there are un-annotated fields in a dataclass

2019-08-26 Thread Arne Recknagel
New submission from Arne Recknagel : When declaring a dataclass with make_dataclass, it is valid to omit type information for fields. __annotations__ understands it and just adds typing.Any, but typing.get_type_hints fails with a cryptic error message: >>> import dataclasses &