Re: [Python-Dev] Python 3 design principles

2005-09-07 Thread Nick Coghlan
Collin Winter wrote: > Am 31-Aug 05, Charles Cazabon <[EMAIL PROTECTED]> schrieb: > > >>Perhaps py3k could have a py2compat module. Importing it could have the >>effect of (for instance) putting compile, id, and intern into the global >>namespace, making print an alias for writeln, alias the sta

Re: [Python-Dev] Python 3 design principles

2005-09-02 Thread JustFillBug
On 2005-09-01, Ron Adam <[EMAIL PROTECTED]> wrote: > As for functions without '()'s. (Just a thought) You could use '<<' or > '<<<' (or other symbol) as a way to move data between objects. > > ui.write <<< 'Hello World/n' # ui.write('Hello World/n') > > ui.writeln <<< counter

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Fred L. Drake, Jr.
On Thursday 01 September 2005 23:00, [EMAIL PROTECTED] wrote: > Then why remove it at all? Bingo. I don't see any need to remove it. I could live with removing the trailing-comma semi-wart, but there just isn't any need to remove it. -Fred -- Fred L. Drake, Jr. ___

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread skip
>> I still hope to see this change to "make print a builtin instead of a >> statement". I'd hate to lose the one-line hello world example due to >> cruft like "from sys import stdout". Barry> I agree. You can't get much simpler to explain or use than the Barry> current print

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Greg Ewing
Reinhold Birkenfeld wrote: > Greg Ewing wrote: > >>There's no way importing a module could add something that >>works like the old print statement, unless some serious >>magic is going on... > > You'd have to enclose print arguments in parentheses. Of course, the "trailing > comma" form would be

[Python-Dev] Python 3 design principles

2005-09-01 Thread Jim Jewett
Nick Craig-Wood wrote: > If come python 3, there is a 99% accurate program which can turn your > python 2.x into python 3 code, then that would ease the transition > greatly. Guido wrote: > That might not be so easy given the desire to change most > list-returning functions and methods into iter

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Ron Adam
Reinhold Birkenfeld wrote: > Greg Ewing wrote: > >>Charles Cazabon wrote: >> >> >>>Perhaps py3k could have a py2compat module. Importing it could have the >>>effect of (for instance) putting compile, id, and intern into the global >>>namespace, making print an alias for writeln, >> >>There's no w

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Guido van Rossum
On 9/1/05, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > I'm all for removing the cruft in python 3, and giving it a bit of a > spring clean, but please, please don't make it feel like a different > language otherwise the users will be deserting in droves (no-one likes > to be told that they've been

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Barry Warsaw
On Thu, 2005-09-01 at 05:54, Nick Coghlan wrote: > Oren Tirosh wrote: > > * Replacing print with write/writeln > > I still hope to see this change to "make print a builtin instead of a > statement". I'd hate to lose the one-line hello world example due to cruft > like "from sys import stdout". I

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Nick Craig-Wood
On Thu, Sep 01, 2005 at 08:55:48AM +0200, Kay Schluehr wrote: > The idea of forking a language with a new release and thereby > deevaluating older code seems somewhat archaic to me. Or the other way > round: archaic materials and media like papyrus and scripture enabled > communication across cent

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Nick Coghlan
Oren Tirosh wrote: > * Replacing print with write/writeln I still hope to see this change to "make print a builtin instead of a statement". I'd hate to lose the one-line hello world example due to cruft like "from sys import stdout". Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] |

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Kay Schluehr
Oren Tirosh wrote: > Python 3 will most probably make big changes in the internal > implementation and the C API. Perhaps it will even be generated from > PyPy. Don't you think the current Python 3 "visions" becomes rather pointless with the raise of PyPy and interpreter extensions that are deve

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Reinhold Birkenfeld
Greg Ewing wrote: > Charles Cazabon wrote: > >> Perhaps py3k could have a py2compat module. Importing it could have the >> effect of (for instance) putting compile, id, and intern into the global >> namespace, making print an alias for writeln, > > There's no way importing a module could add som

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Oren Tirosh
On 9/1/05, Robert Kern <[EMAIL PROTECTED]> wrote: > Oren Tirosh wrote: > > > While a lot of existing code will break on 3.0 it is still generally > > possible to write code that will run on both 2.x and 3.0: use only the > > "proper" forms above, do not assume the result of zip or range is a > > l

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Greg Ewing
Charles Cazabon wrote: > Perhaps py3k could have a py2compat module. Importing it could have the > effect of (for instance) putting compile, id, and intern into the global > namespace, making print an alias for writeln, There's no way importing a module could add something that works like the ol

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread James Y Knight
On Aug 31, 2005, at 5:00 PM, Robert Kern wrote: > IMO, if we are going to restrict Python 3000 enough to protect that > "common subset," then there's not enough payoff to justify breaking > *any* backwards compatibility. If my current codebase[1] isn't > going to > be supported in Python 3000, I

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Robert Kern
Oren Tirosh wrote: > While a lot of existing code will break on 3.0 it is still generally > possible to write code that will run on both 2.x and 3.0: use only the > "proper" forms above, do not assume the result of zip or range is a > list, use absolute imports (and avoid static types, of course).

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Collin Winter
Am 31-Aug 05, Charles Cazabon <[EMAIL PROTECTED]> schrieb: > Perhaps py3k could have a py2compat module. Importing it could have the > effect of (for instance) putting compile, id, and intern into the global > namespace, making print an alias for writeln, alias the standard library > namespace, .

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Neal Norwitz
On 8/31/05, Oren Tirosh <[EMAIL PROTECTED]> wrote: > > Writing programs that run on both 2.x and 3 may require ugly > version-dependent tricks like: > > try: > compile > except NameError: > from sys import compile Note we can ease this process a little by making a copy without removing,

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Charles Cazabon
Oren Tirosh <[EMAIL PROTECTED]> wrote: > > Not all proposed changes remove redundancy or add completely new > things. Some of them just change the way certain things must be done. > For example: > * Moving compile, id, intern to sys > * Replacing print with write/writeln > And possibly the bigge

[Python-Dev] Python 3 design principles

2005-08-31 Thread Oren Tirosh
Most of the changes in PEP 3000 are tightening up of "There should be one obvious way to do it.": * Remove multiple forms of raising exceptions, leaving just "raise instance" * Remove exec as statement, leaving the compatible tuple/call form. * Remove <>, ``, leaving !=, repr etc. Other changes