[issue30772] If I make an attribute "

2017-06-29 Thread Nate Soares
Nate Soares added the comment: To be clear, the trouble I was trying to point at is that if foo.py didn't have __all__, then it would still have a BB attribute. But if the module is given __all__, the BB is normalized away into a B. This seems like pretty strange/counterintuitive behavior. For

[issue30772] If I make an attribute "[a unicode version of B]", it gets assigned to "[ascii B]", and so on.

2017-06-28 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30772] If I make an attribute "[a unicode version of B]", it gets assigned to "[ascii B]", and so on.

2017-06-27 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___

[issue30772] If I make an attribute "[a unicode version of B]", it gets assigned to "[ascii B]", and so on.

2017-06-26 Thread Matthew Barnett
Matthew Barnett added the comment: See PEP 3131 -- Supporting Non-ASCII Identifiers It says: """All identifiers are converted into the normal form NFKC while parsing; comparison of identifiers is based on NFKC.""" >>> import unicodedata >>> unicodedata.name(unicodedata.normalize('NFKC',

[issue30772] If I make an attribute "[a unicode version of B]", it gets assigned to "[ascii B]", and so on.

2017-06-26 Thread Ezio Melotti
Ezio Melotti added the comment: I can reproduce the issue: $ cat foo.py 픹픹 = 1 __all__ = ['픹픹'] $ python3 -c 'import foo; print(dir(foo)); from foo import *' ['BB', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__'] Traceback

[issue30772] If I make an attribute "[a unicode version of B]", it gets assigned to "[ascii B]", and so on.

2017-06-26 Thread Nate Soares
New submission from Nate Soares: [NOTE: In this comment, I use BB to mean unicode character 0x1D539, b/c the issue tracker won't let me submit a comment with unicode characters in it.] Directory structure: repro/ foo.py test_foo.py Contents of foo.py: BB = 1 __all__ = ['BB']