Python-list digest, Vol 1 #14539 - 13 msgs

Steven Cummings cummingscs at netscape.net
Tue Feb 18 21:13:25 EST 2003


Well, I guess it's a good thing they have us talk on the list about PEP ideas, because I clearly wasn't thinking in the right context about my original idea. I was thinking purely from the standpoint of the syntax that I imagined in my head without considering different ways that I can do it. So for now I'd have to agree that a syntax change is not warranted. I'll of course think harder next time I *think* I have a brilliant idea. Thanks for the discussion. Sorry to waste time.

/S

python-list-request at python.org wrote:

>Subject: Re: Pre-PEP ideas
>Date: Wed, 19 Feb 2003 12:54:16 +1300
>From: "Greg Ewing (using news.cis.dfn.de)" <me at privacy.net>
>To: python-list at python.org
>
>Alex Martelli wrote:
>
>> And why, even then, would the reasonably simple style:
>> 
>> def _A__pprint(self):
>>     print self._value
>> A.pprint = _A_pprint
>> 
>> be so bad as to warrant a syntax addition to Python?
>
>
>
>Because it's far too ugly a thing to use on a
>regular basis.
>
>
>
>Ian Bicking wrote:
>> you are implying there should be an entirely different style
>> of source file.  A file like:
>>
>> class A: pass
>> 
>> def A.__init__(self):
>>    ...
>
>Yes, although I'm a bit uncomfortable about it myself
>
>now that I come to think about it. Having all your class
>definitions empty would seem a bit strange in Python.
>
>Maybe a compromise would be to optionally allow the
>class name to be specified, but still require the def
>to be inside the class -- the compiler would check that
>the name used actually matches the class it's in.
>
>
>
>  class A:
>
>
>
>     def A.__init__(self):
>       ...
>
>     def B.blarg(self, x): # Syntax error - wrong class name
>       ...
>
>
>
>
>-- 
>Greg Ewing, Computer Science Dept,
>University of Canterbury,  
>Christchurch, New Zealand
>http://www.cosc.canterbury.ac.nz/~greg
>
>
-- 
Steven Cummings
Columbia, MO
Email: cummingscs at netscape.net
AIM:   cummingscs
ICQ:   3330114


__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/





More information about the Python-list mailing list