da-dada <georg.klingenb...@travedsl.de> added the comment:

my use case is different (I do a loop), but what I expected from the docs (just 
for fun!)

class Ddefault:

    def __init__(self):
        vars(self).setdefault('default', self.set_default() if not 'default' in 
vars(self) else self.default)
        vars(self).setdefault('default', self.set_default() if not 'default' in 
vars(self) else self.default)
        print(vars(self))

    def set_default(self):
        print(vars(self))
        return 'default'

if __name__ == "__main__":
    Ddefault()

may be the coding diverted from the docs after the fixing of issue 13521 and no 
one dares correcting..
anyway, I will probably keep my old coding (performance, if there is any)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to