> @mainmethod
> def main(...)
>
> and like this:
>
> @mainmethod(parser=myparser)
> def main(...)
>
> then you cannot use that decorator for a function that expects or
> allows a function as its first argument? Because how and
If it's called with only one non-keyword parameter, then the language
m
> Has anyone thought about alternatives? Is there a previous discussion
> on this I can look up?
Okay, I just emailed the BDFL and asked if he could tell me the origin
of the double underscore syntax for __special__ methods, and what he
said I'm pretty sure he won't mind me posting here:
> [Guid
On Feb 19, 10:01 am, Duncan Booth <[EMAIL PROTECTED]>
wrote:
> Berwyn <[EMAIL PROTECTED]> wrote:
> >> Is it just me that thinks "__init__" is rather ugly? Not to mention
> >> "if __name__ == '__main__': ..."?
>
> > That ugliness has long been my biggest bugbear with python, too. The
> > __name__ =
On Feb 21, 3:31 am, [EMAIL PROTECTED] wrote:
> On Feb 19, 8:20 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > On Feb 19, 10:26 am, Wildemar Wildenburger
> > > <[EMAIL PROTECTED]> wrote:
> > >> Jason wrote:
> > >>> Hmm. I must be the only person who doesn't thi
On Feb 19, 8:20 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Feb 19, 10:26 am, Wildemar Wildenburger
> > <[EMAIL PROTECTED]> wrote:
> >> Jason wrote:
> >>> Hmm. I must be the only person who doesn't think the double
> >>> underscores are ugly.
> >> Nope. I like the
On Tue, 19 Feb 2008 21:50:33 -0800, Ivan Illarionov wrote:
> I would like to see something like %init or &init to be converted to
> __init__ behind the scenes.
Unfortunately -- or perhaps fortunately -- % clashes with the already
established uses of % as the modulus operator for numbers and the
On Wed, 20 Feb 2008 03:12:39 -0800, cokofreedom wrote:
> So people's problem with __word__ is that it is not very readable?
>
> How so, it stands out on page, it clearly is different from other
> objects and doesn't abuse other symbols that generally have a meaning
> based on their use.
>
> I ha
[EMAIL PROTECTED] writes:
> So people's problem with __word__ is that it is not very readable?
No, the complaint seems to be that it's "ugly".
--
\ "[T]he speed of response of the internet will re-introduce us |
`\to that from which our political systems have separated us for |
_o_
So people's problem with __word__ is that it is not very readable?
How so, it stands out on page, it clearly is different from other
objects and doesn't abuse other symbols that generally have a meaning
based on their use.
I haven't seen a single alternative that really stands out as much as
__wo
benhoyt a écrit :
>>> Then again, what's stopping us just using a single leading underscore?
>>> Nobody calls their own private methods _init or _add
>> You must be looking at different code from the rest of us. A single
>> leading underscore on the name *is* the convention for "this attribute
>> i
benhoyt a écrit :
(snip)
> Then again, what's stopping us just using a single leading underscore?
> Nobody calls their own private methods _init or _add
I do.
--
http://mail.python.org/mailman/listinfo/python-list
Jason a écrit :
(snip)
> Hmm. I must be the only person who doesn't think the double
> underscores are ugly.
As far as I'm concerned, I just don't care if they are "ugly" or not -
FWIW, I never ever think of them in terms of "beauty" or "ugliness".
What I do care about is that they simply and
Ivan Illarionov wrote:
> I would like to see something like %init or &init to be converted to
> __init__ behind the scenes. And $something to be converted to
> self.something. But, unfortunately, most Python people would consider
> this ugly just because Perl uses too much syntactic sugar and anyt
Please preserve attribution lines on the quoted material, so we can
see who wrote what at each level.
benhoyt <[EMAIL PROTECTED]> writes:
> > > Then again, what's stopping us just using a single leading
> > > underscore? Nobody calls their own private methods _init or _add
> >
> > You must be loo
> > Then again, what's stopping us just using a single leading underscore?
> > Nobody calls their own private methods _init or _add
>
> You must be looking at different code from the rest of us. A single
> leading underscore on the name *is* the convention for "this attribute
> is not part of the
Ivan Illarionov <[EMAIL PROTECTED]> writes:
> I would like to see something like %init or &init to be converted to
> __init__ behind the scenes.
I would prefer that the names I create and see in the code are the
names actually used by the Python runtime, with no magic name
conversion "behind the
I would like to see something like %init or &init to be converted to
__init__ behind the scenes. And $something to be converted to
self.something. But, unfortunately, most Python people would consider
this ugly just because Perl uses too much syntactic sugar and anything
Perl-like is considered ugl
[EMAIL PROTECTED] wrote:
> My editor actually renders them as miniature chess pieces. The
> bartender said she runs a pre-execution step, that searches and
> replaces a double-colon with the underscores.
I'm sorry, did you hit your head before dashing off your recent posts or
something?
--
Er
benhoyt <[EMAIL PROTECTED]> writes:
> Then again, what's stopping us just using a single leading underscore?
> Nobody calls their own private methods _init or _add
You must be looking at different code from the rest of us. A single
leading underscore on the name *is* the convention for "this attr
[EMAIL PROTECTED] wrote:
> On Feb 19, 10:26 am, Wildemar Wildenburger
> <[EMAIL PROTECTED]> wrote:
>> Jason wrote:
>>> Hmm. I must be the only person who doesn't think the double
>>> underscores are ugly.
>> Nope. I like them too. :)
>>
>> Frankly, I think it's just a matter of adaption. I too fou
> My editor actually renders [underscores] as miniature chess pieces.
> The bartender said she runs a pre-execution step, that searches and
> replaces a double-colon with the underscores.
Heh, that makes me think. Great use for character encodings! Just like
Tim Hatch's "pybraces", we could use a
On Feb 19, 10:26 am, Wildemar Wildenburger
<[EMAIL PROTECTED]> wrote:
> Jason wrote:
> > Hmm. I must be the only person who doesn't think the double
> > underscores are ugly.
>
> Nope. I like them too. :)
>
> Frankly, I think it's just a matter of adaption. I too found it rather
> "ugly" in the be
Marco Mariani <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
>
> >> I realise that double underscores make the language conceptually
> >> cleaner in many ways (because fancy syntax and operator overloading
> >> are just handled by methods), but they don't *look* nice.
> >
> > That's a good thing
On Feb 19, 4:01 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Berwyn <[EMAIL PROTECTED]> wrote:
> >> Is it just me that thinks "__init__" is rather ugly? Not to mention
> >> "if __name__ == '__main__': ..."?
>
> > That ugliness has long been my biggest bugbear with python, too. The
> > __name__ ==
Jason wrote:
> Hmm. I must be the only person who doesn't think the double
> underscores are ugly.
Nope. I like them too. :)
Frankly, I think it's just a matter of adaption. I too found it rather
"ugly" in the beginning, but with anything, I've gotten used to it. (And
I wholeheartedly support
On Feb 18, 3:28 pm, benhoyt <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I've been using Python for some time now, and am very impressed with
> its lack of red tape and its clean syntax -- both probably due to the
> BDFL's ability to know when to say "no".
>
> Most of the things that "got me" initiall
Ben Finney wrote:
>> I realise that double underscores make the language conceptually
>> cleaner in many ways (because fancy syntax and operator overloading
>> are just handled by methods), but they don't *look* nice.
>
> That's a good thing, in that it draws attention to the names.
Well, double
Berwyn <[EMAIL PROTECTED]> wrote:
>> Is it just me that thinks "__init__" is rather ugly? Not to mention
>> "if __name__ == '__main__': ..."?
>
> That ugliness has long been my biggest bugbear with python, too. The
> __name__ == '__main__' thing is something I always have to look up,
> every tim
> [Terry Jan Reedy]
> No, the reservered special names are supposed to be ugly ;-) -- or at least
> to stand out. However, since special methods are almost always called
> indirectly by syntax and not directly, only the class writer or reader, but
> not users, generally see them.
Fair enough, bu
[benhoyt]
> Is it just me that thinks "__init__" is rather ugly?
I also find it unattractive and unpleasant to type.
In Py3.0, I would support a single underscore convention, _init_ or
somesuch.
I'm not sure what the aesthetic reasons are, but somehow the change
from double underscores to single
"benhoyt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi guys,
|
| I've been using Python for some time now, and am very impressed with
| its lack of red tape and its clean syntax -- both probably due to the
| BDFL's ability to know when to say "no".
|
| Most of the things that
benhoyt wrote:
> Is it just me that thinks "__init__" is rather ugly?
I used to hate looking at and having the type out all those
underscores (surely two leading or one on either side would do?), but
I've gotten so used to it by now the eyes don't see and the fingers
work by themselves.
> Not to
benhoyt <[EMAIL PROTECTED]> writes:
> Not to mention "if __name__ == '__main__': ..."?
Unlike the double-underscore attribute names for signalling "special
meaning", that particular hack is IMO unnecessarily ugly.
I don't, however, think it's likely to go away any time soon. If
that's the uglies
> Is it just me that thinks "__init__" is rather ugly? Not to mention
> "if __name__ == '__main__': ..."?
That ugliness has long been my biggest bugbear with python, too. The
__name__ == '__main__' thing is something I always have to look up,
every time I use it, too ... awkward.
I'd settle for:
benhoyt <[EMAIL PROTECTED]> writes:
> I realise that double underscores make the language conceptually
> cleaner in many ways (because fancy syntax and operator overloading
> are just handled by methods), but they don't *look* nice.
That's a good thing, in that it draws attention to the names. Th
Hi guys,
I've been using Python for some time now, and am very impressed with
its lack of red tape and its clean syntax -- both probably due to the
BDFL's ability to know when to say "no".
Most of the things that "got me" initially have been addressed in
recent versions of Python, or are being ad
36 matches
Mail list logo