On 25/06/2020 15:40, Tim Peters wrote:
Then I am surprised, which is worse. "long.chain.of.attributes" looks like an assignment target, and I would have expected the case to have been a name pattern.[Rhodri James <[email protected]>]See reply to Glenn. Can you give an example of a dotted name that is not a constant value pattern? An example of a non-dotted name that is? If you can't do either (and I cannot)), then that's simply what "ifcase long.chain.of.attributes:That's a dotted name and so is a constant value pattern - read the PEP. Every dotted name in a pattern is looked up using normal Python name resolution rules, and the value is used for comparison by equality with the matching expression (same as for literals).
-- Rhodri James *-* Kynesim Ltd _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/HKW7XZTN6JAYGMM7BQBKKC7M5OH6SARG/ Code of Conduct: http://python.org/psf/codeofconduct/