Re: Something annoying about method __set_name__ in descriptors

2020-04-21 Thread ast
Le 21/04/2020 à 18:32, Dieter Maurer a écrit : ast wrote at 2020-4-21 14:27 +0200: I recently read the Python (3.9a5) documentation - and there I found clearly expressed this behaviour (I no longer can tell you exactly where I read this). The reason comes from the implementation: when the de

Re: Something annoying about method __set_name__ in descriptors

2020-04-21 Thread Dieter Maurer
ast wrote at 2020-4-21 14:27 +0200: > From python version 3.6, there is a useful new method >__set_name__ which could be implemented in descriptors. > >This method is called after a descriptor is instantiated >in a class. Parameter "name" is filled with the name >of the attribute refering to the de

Something annoying about method __set_name__ in descriptors

2020-04-21 Thread ast
Hello From python version 3.6, there is a useful new method __set_name__ which could be implemented in descriptors. This method is called after a descriptor is instantiated in a class. Parameter "name" is filled with the name of the attribute refering to the descriptor in the class Here is an e