May-02-2023, 06:24 PM
Why do you consider
I think the symmetry of my suggestion would be preferable. I liken the existing way to giving a list of items as
class A: def _foo_getter(self): return 10 def _foo_setter(self, value): print('Hello there!') def _foo_deleter(self): print('Deleting foo') foo = property(_foo_getter, _foo_setter, _foo_deleter)clearer than
class A: @getter def foo(self): return 10 @setter def foo(self, value): print('Hello there!') @deleter def foo(self): print('Deleting foo')
I think the symmetry of my suggestion would be preferable. I liken the existing way to giving a list of items as
1. first item 2. second item C. third itemWhile the intent is understood, it lacks symmetry and clarity. It brings to mind a beef I have with Windows in that the registry entries are, in my opinion (and in the opinion of at least one former MS engineer), moronic.
Special folder Registry entry name -------------- ------------------- My Music My Music My Pictures My Pictures My Video My Videos My Documents PersonalThis, after all, is why Python has standards for the naming of classes, methods, etc.