Pre-PEP ideas
Greg Ewing (using news.cis.dfn.de)
me at privacy.net
Mon Feb 17 17:18:49 EST 2003
Richard Jones wrote:
>
> On Mon, 17 Feb 2003 1:06 pm, Steven Cummings wrote:
>
> > def A.print(self):
> > "print a string representation to sys.stdout"
> > print self._value
>
> I'd vote -1 for this simply because there's already a way to do this.
The existing way is fine assuming assuming you only want
to do this rarely. But I can think of a reason for wanting
to do this a lot.
When I have more than one class in a source file, and I'm
looking at a method definition, it can be hard to tell which
class it belongs to. In order to get a sense of where abouts
I am, I have to scroll up until I find the class statement,
and then scroll back down again to where I was. This is
terribly disruptive to one's flow of thought.
If I could declare all my methods using the above style,
this problem would go away.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list