Re: [Python-3000] Need help completing ABC pep

2007-04-22 Thread Jeffrey Yasskin
On 4/21/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 4/21/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote: > > PartiallyOrdered: > > This ABC defines the 5 inequality operations <, <=, >=, >, and cmp(). > > Actually, I'm hoping to eliminate cmp() completely. Also, even if it > doesn't get eli

[Python-3000] question Re: Need help completing ABC pep

2007-04-22 Thread Samuele Pedroni
Guido van Rossum wrote: > > > I don't believe that's always true. I can imagine use cases where, if > I were writing it in an if-then-else fashion, I'd be writing the > *same* if-test several times as part of a particular algorithm, > without having an easy way to refactor the algorithm so that the

Re: [Python-3000] Fixing super anyone?

2007-04-22 Thread Greg Ewing
Michele Cella wrote: > Personally, I really like this syntax: > > res = super currentmethod(arg, arg) > > Why? because it's very consistent (pythonic?) with the way I'm used to > use any other keyword. But it's inconsistent with the way every other method is called. -- Greg __

Re: [Python-3000] Fixing super anyone?

2007-04-22 Thread Aahz
On Mon, Apr 23, 2007, Greg Ewing wrote: > Michele Cella wrote: >> >> Personally, I really like this syntax: >> >> res = super currentmethod(arg, arg) >> >> Why? because it's very consistent (pythonic?) with the way I'm used to >> use any other keyword. > > But it's inconsistent with the way ev

[Python-3000] PEP to change how the main module is delineated

2007-04-22 Thread Brett Cannon
This PEP is to change the ``if __name__ == "__main__": ...`` idiom to ``if __name__ == sys.main: ...`` so that you at least have a chance to execute module in a package that use relative imports. Ran this PEP past python-ideas. Stopped the discussion there when too many new ideas were being prop

Re: [Python-3000] PEP to change how the main module is delineated

2007-04-22 Thread Christian Heimes
Brett Cannon wrote: > Implementation > == > > When the ``-m`` option is used, ``sys.main`` will be set to the > argument passed in. ``sys.argv`` will be adjusted as it is currently. > Then the equivalent of ``__import__(self.main)`` will occur. This > differs from current semantics a

[Python-3000] PEP 30xx: Access to Module/Class/Function Currently Being Defined (this)

2007-04-22 Thread Jim Jewett
(Please note that several groups were Cc'd. For now, please limit followups to python-3000. This would *probably* be backported to 2.6, but that wouldn't be decided until the implementation strategy was settled.) PEP: 30XX Title: Access to Module/Class/Function Currently Being Defined (this) Ver

Re: [Python-3000] PEP to change how the main module is delineated

2007-04-22 Thread Neal Norwitz
Can you add refs to all the PEPs? Will this go into 2.6 also? If so, you should send to python-dev too. If this is accepted, can you update the 2.6 PEP 361. On 4/22/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > > Implementation > == > > When the ``-m`` option is used, ``sys.main`` wi

Re: [Python-3000] [Python-Dev] PEP 30xx: Access to Module/Class/Function Currently Being Defined (this)

2007-04-22 Thread Steven Bethard
On 4/22/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > PEP: 30XX > Title: Access to Module/Class/Function Currently Being Defined (this) [snip] > > Abstract > > It is common to need a reference to the current module, class, > or function, but there is currently no entirely correct way to >

Re: [Python-3000] question Re: Need help completing ABC pep

2007-04-22 Thread Guido van Rossum
On 4/22/07, Samuele Pedroni <[EMAIL PROTECTED]> wrote: > If we keep s % d (do we? reading the list archives and the peps didn't > give an answer, I suppose it depends if PEP 3101 is accepted): > > will it check if d is a Mapping or continue to use the current heuristics? > > I suppose this is a leg

Re: [Python-3000] PEP to change how the main module is delineated

2007-04-22 Thread Brett Cannon
On 4/22/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > Brett Cannon wrote: > > Implementation > > == > > > > When the ``-m`` option is used, ``sys.main`` will be set to the > > argument passed in. ``sys.argv`` will be adjusted as it is currently. > > Then the equivalent of ``__impor

Re: [Python-3000] PEP to change how the main module is delineated

2007-04-22 Thread Brett Cannon
On 4/22/07, Neal Norwitz <[EMAIL PROTECTED]> wrote: > Can you add refs to all the PEPs? > Sure, although considering my laptop died within minutes of my last commit to 25-maint it might be a little while (using my girlfriend's laptop to check email). > Will this go into 2.6 also? It's covered in

[Python-3000] Generic function PEP won't make it in time

2007-04-22 Thread Phillip J. Eby
I got off to a good start in terms of figuring out what needs to be in the PEP... good enough to realize that a complete specification of what I have in mind is probably going to dwarf the WSGI spec. There are just too many details that have to be explained; the roughly 1000 lines of Python co

Re: [Python-3000] PEP 30xx: Access to Module/Class/Function CurrentlyBeing Defined (this)

2007-04-22 Thread Terry Reedy
"Jim Jewett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |Functions (including methods) often want access to themselves, |usually for a private storage location. Or for true recursion. At present, a function has to 'hope' that its definition name is not rebound. tjr

Re: [Python-3000] PEP to change how the main module is delineated

2007-04-22 Thread Steven Bethard
On 4/22/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > Implementation > == > > When the ``-m`` option is used, ``sys.main`` will be set to the > argument passed in. ``sys.argv`` will be adjusted as it is currently. > Then the equivalent of ``__import__(self.main)`` will occur. This > d

Re: [Python-3000] Fixing super anyone?

2007-04-22 Thread Michele Cella
Greg Ewing wrote: > Michele Cella wrote: > >> Personally, I really like this syntax: >> >> res = super currentmethod(arg, arg) >> >> Why? because it's very consistent (pythonic?) with the way I'm used to >> use any other keyword. > > But it's inconsistent with the way every other > method is cal