Accessors in Python (getters and setters)

mystilleef mystilleef at gmail.com
Mon Jul 10 08:19:47 EDT 2006


Hello,

What is the Pythonic way of implementing getters and setters. I've
heard
people say the use of accessors is not Pythonic. But why? And what is
the alternative? I refrain from using them because they smell
"Javaish."
But now my code base is expanding and I'm beginning to appreciate the
wisdom behind them. I welcome example code and illustrations.

Regards




More information about the Python-list mailing list