Re: Embedding classes' names

2019-07-17 Thread DL Neil
On 16/07/19 10:57 PM, Cameron Simpson wrote: On 16Jul2019 10:20, Chris Angelico wrote: On Tue, Jul 16, 2019 at 10:17 AM DL Neil wrote: When used, do you embed a class's name within its own code, as a literal? [...] So, what about other situations where one might need to access the class's o

Re: Embedding classes' names

2019-07-16 Thread Cameron Simpson
On 16Jul2019 10:20, Chris Angelico wrote: On Tue, Jul 16, 2019 at 10:17 AM DL Neil wrote: When used, do you embed a class's name within its own code, as a literal? [...] So, what about other situations where one might need to access the class's own name or that of its/a super-class? eg clas

Re: Embedding classes' names

2019-07-15 Thread Chris Angelico
On Tue, Jul 16, 2019 at 10:17 AM DL Neil wrote: > > When used, do you embed a class's name within its own code, as a literal? > > > In the thread "super or not super?", the OP asked: > <<< > C1.__init__(self) or > super().__init__() > >>> > > One of the answers recommended super()

Embedding classes' names

2019-07-15 Thread DL Neil
When used, do you embed a class's name within its own code, as a literal? In the thread "super or not super?", the OP asked: <<< C1.__init__(self) or super().__init__() >>> One of the answers recommended super() [agreed!] in order to avoid embedding "C1" into the code. The expl