Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread martin
Zitat von Jim Jewett <[EMAIL PROTECTED]>: > On 9/21/07, Paul Moore <[EMAIL PROTECTED]> wrote: >> On 21/09/2007, Jim Jewett <[EMAIL PROTECTED]> wrote: >> > (Outside ASCII), if you treat sys.argv as text, that is probably >> > impossible without filesystem support. Before python even sees the >> >

Re: [Python-3000] decorators for variable assignments?

2007-09-21 Thread Guido van Rossum
Can we stop this already? The idea is dead. No need to drag it through the mud around town for an extended period of time. On 9/21/07, Nicko van Someren <[EMAIL PROTECTED]> wrote: > On 21 Sep 2007, at 22:51, Terry Reedy wrote: > > > | @validate_proxy > > | proxy = "http://user:[EMAIL PROTECTED]:

Re: [Python-3000] Py3k Trivia :-)

2007-09-21 Thread Guido van Rossum
On 9/21/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > """ > > George isn't tall enough to ride the greatest rollercoaster of all > > time, The Turbo Python 3000. He uses licorice whips to measure his > > height and determines that he is 7-whips tall, one short of the 8-whi

Re: [Python-3000] Immutable bytes -- looking for volunteer

2007-09-21 Thread Travis Oliphant
Guido van Rossum wrote: > This may have passed in a thread where no-one was listening, so I'm > repeating it here. > > I'm considering the following option: bytes would always be immutable, > and for the few places (mostly in io.py) where a mutable bytes buffer > would be handy, we use the array m

Re: [Python-3000] decorators for variable assignments?

2007-09-21 Thread Greg Ewing
On 9/21/07, Arvind Singh <[EMAIL PROTECTED]> wrote: > @validate_proxy > proxy = "http://user:[EMAIL PROTECTED]:port/" > > it makes more sense to have the validation > of a user supplied configuration value at the time of assignment > rather than leaving the burden of validation on every piece of

Re: [Python-3000] Py3k Trivia :-)

2007-09-21 Thread Greg Ewing
Guido van Rossum wrote: > """ > George isn't tall enough to ride the greatest rollercoaster of all > time, The Turbo Python 3000. He uses licorice whips to measure his > height and determines that he is 7-whips tall, one short of the 8-whip > minimum! > """ Fantastic! I vote that we hereby adopt t

Re: [Python-3000] decorators for variable assignments?

2007-09-21 Thread Nicko van Someren
On 21 Sep 2007, at 22:51, Terry Reedy wrote: > | @validate_proxy > | proxy = "http://user:[EMAIL PROTECTED]:port/" > | > | be a syntactical sugar for: > | proxy = validate_proxy("http://user:[EMAIL PROTECTED]:port/") > > Sorry, to me, this is syntactical pepper -- or worse ;-) I'm thinking it

Re: [Python-3000] decorators for variable assignments?

2007-09-21 Thread Arvind Singh
> | @validate_proxy > | proxy = "http://user:[EMAIL PROTECTED]:port/" > | > | be a syntactical sugar for: > | proxy = validate_proxy("http://user:[EMAIL PROTECTED]:port/") > > Sorry, to me, this is syntactical pepper -- or worse ;-) "Poison" perhaps? Then, maybe we can have Poisonous Python! :-

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Terry Reedy
"Michael Urman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | If there's not something straightforward to put in the ... below that | would allow simple iteration and processing of all files passed on the | command line, preferably interchangeably on both unix (where filenames |

Re: [Python-3000] decorators for variable assignments?

2007-09-21 Thread Terry Reedy
| @validate_proxy | proxy = "http://user:[EMAIL PROTECTED]:port/" | | be a syntactical sugar for: | proxy = validate_proxy("http://user:[EMAIL PROTECTED]:port/") Sorry, to me, this is syntactical pepper -- or worse ;-) tjr ___ Python-3000 mailing

Re: [Python-3000] decorators for variable assignments?

2007-09-21 Thread Guido van Rossum
None of the arguments for function and class decorators apply here. On 9/21/07, Arvind Singh <[EMAIL PROTECTED]> wrote: > Hi, > > We have function and class decorators. Can we also have decorators for > variable assignments? > > For example: > @validate_proxy > proxy = "http://user:[EMAIL PROT

[Python-3000] decorators for variable assignments?

2007-09-21 Thread Arvind Singh
Hi, We have function and class decorators. Can we also have decorators for variable assignments? For example: @validate_proxy proxy = "http://user:[EMAIL PROTECTED]:port/" be a syntactical sugar for: proxy = validate_proxy("http://user:[EMAIL PROTECTED]:port/") Python is often used as a

Re: [Python-3000] New io system and binary data

2007-09-21 Thread Christian Heimes
Guido van Rossum wrote: > You can repeat that until you're blue in the face but it's not going > to change. Way more programs (especially simple ones) deal with txet > than with binary data. I have to agree with Guido. The new behavior is much better than the default in Python 2.x. It seems that I

[Python-3000] Py3k Trivia :-)

2007-09-21 Thread Guido van Rossum
Would you believe there's a Curious George episode named "Curious George Vs The Turbo Python 3000"? """ George isn't tall enough to ride the greatest rollercoaster of all time, The Turbo Python 3000. He uses licorice whips to measure his height and determines that he is 7-whips tall, one short of

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Paul Moore
On 21/09/2007, Jim Jewett <[EMAIL PROTECTED]> wrote: > If you are using text (as opposed to bytes), then À can be either > U+00C0 or . If the file system makes a distinction, > then it is using bytes, and any program interacting with it needs* to > use bytes too. OK. I don't know enough about Uni

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Michael Urman
On 9/21/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > (Outside ASCII), if you treat sys.argv as text, that is probably > impossible without filesystem support. Before python even sees the > data, the terminal itself is allowed to change between canonical > equivalents, which have different binary re

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Thomas Heller
Jean-Paul Calderone schrieb: > On Fri, 21 Sep 2007 10:00:38 -0400, Jim Jewett <[EMAIL PROTECTED]> wrote: >> [snip] >> >>It does sound like we need a way to get to the original bytes, similar >>to sys.stdin.buffer. Is it reasonable to expose sys.argv.buffer? >>(Since this would be bytes rather than

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Jim Jewett
On 9/21/07, Paul Moore <[EMAIL PROTECTED]> wrote: > On 21/09/2007, Jim Jewett <[EMAIL PROTECTED]> wrote: > > (Outside ASCII), if you treat sys.argv as text, that is probably > > impossible without filesystem support. Before python even sees the > > data, the terminal itself is allowed to change be

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Jean-Paul Calderone
On Fri, 21 Sep 2007 10:00:38 -0400, Jim Jewett <[EMAIL PROTECTED]> wrote: > [snip] > >It does sound like we need a way to get to the original bytes, similar >to sys.stdin.buffer. Is it reasonable to expose sys.argv.buffer? >(Since this would be bytes rather than text, I assume this would be a >sin

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Jim Jewett
On 9/18/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 9/18/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > > ... given that defenc is now always UTF-8, won't exposing > > it in the public typedef then just be an attractive nuisance? > *ALL* fields of the struct def are strictly internal. Is t

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Paul Moore
On 21/09/2007, Jim Jewett <[EMAIL PROTECTED]> wrote: > (Outside ASCII), if you treat sys.argv as text, that is probably > impossible without filesystem support. Before python even sees the > data, the terminal itself is allowed to change between canonical > equivalents, which have different binary

Re: [Python-3000] Unicode and OS strings

2007-09-21 Thread Jim Jewett
On 9/18/07, James Y Knight <[EMAIL PROTECTED]> wrote: > On Sep 18, 2007, at 11:11 AM, Guido van Rossum wrote: > One of the more common things to do with command line arguments is > open them. So, it'd really be nice if: > python -c 'import sys; open(sys.argv[1])' [some filename] > would always w