Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Martin v. Löwis
Josiah Carlson wrote: In this case it's not just a misreading, the characters look identical! When is an 'E' not an 'E'? When it is an Epsilon or Ie. Saying what characters will or will not be used as identifiers, when those characters are keys on a keyboard of a specific type, is pretty

Re: [Python-Dev] Proposed resolutions for open PEP 343 issues

2005-10-26 Thread Eric Nieuwland
Guido van Rossum wrote: [Eric are all your pets called Eric? Nieuwland] Hmmm... Would it be reasonable to introduce a ProtocolError exception? [Guido] And which perceived problem would that solve? [Eric] It was meant to be a bit more informative about what is wrong. ProtocolError:

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Martin v. Löwis
Greg Ewing wrote: Would it help if an identifier were required to be made up of letters from the same alphabet, e.g. all Latin or all Greek or all Cyrillic, but not a mixture. Then you'd get an immediate error if you accidentally slipped in a letter from the wrong alphabet. Not in the

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Walter Dörwald
Am 25.10.2005 um 23:40 schrieb Josiah Carlson: [...] Identically drawn glyphs are a problem, and pretending that they aren't a problem, doesn't make it so. Right now, all possible name glyphs are visually distinct, which would not be the case if any unicode character could be used

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread M.-A. Lemburg
Martin v. Löwis wrote: M.-A. Lemburg wrote: A few years ago we had a discussion about this on python-dev and agreed to stick with ASCII identifiers for Python. I still think that's the right way to go. I don't think there ever was such an agreement. You even argued against having non-ASCII

Re: [Python-Dev] PEP 351, the freeze protocol

2005-10-26 Thread Paolino
Paolino wrote: Is __hash__=id inside a class enough to use a set (sets.Set before 2.5) derived class instance as a key to a mapping? It is __hash__=lambda self:id(self) that is terribly slow ,it needs a faster way to state that to let them be useful as key to mapping as all set operations

Re: [Python-Dev] Divorcing str and unicode (no more implicit conversions).

2005-10-26 Thread Bengt Richter
At 11:43 2005-10-24 +0200, M.-A. Lemburg wrote: Bengt Richter wrote: Please bear with me for a few paragraphs ;-) Please note that source code encoding doesn't really have anything to do with the way the interpreter executes the program - it's merely a way to tell the parser how to convert

[Python-Dev] ? operator in python

2005-10-26 Thread Lucky Wankhede
Dear sir, I m a student of Computer Science Dept. University Of Pune.(M.S.) (India). Sir , I have found that the python is about to have feature of ? operator same as in C languge. Sir , Not Only I but the our whole Dept. is waitng for it.

[Python-Dev] ? operator in python

2005-10-26 Thread Lucky Wankhede
Dear sir, I m a student of Computer Science Dept. University Of Pune.(M.S.) (India). We are learning python as a course for our semester. Found its not only use full but heart touching laguage. Sir , I have found that the python is going to have new feature, of ?

Re: [Python-Dev] PEP 343 - multiple context managers in one statement

2005-10-26 Thread Paul Moore
On 10/25/05, Nick Coghlan [EMAIL PROTECTED] wrote: Paul Moore wrote: [...] Has the option of letting the with statement admit multiple context managers been considered (and presumably rejected)? [...] Not rejected - deliberately left as a future option (this is the reason why the RHS of an

Re: [Python-Dev] Proposed resolutions for open PEP 343 issues

2005-10-26 Thread Michael Chermside
Guido writes: I find AttributeError: __exit__ just as informative. Eric Nieuwland responds: I see. Then why don't we unify *Error into Error? Just read the message and know what it means. And we could then drop the burden of exception classes and only use the message. A sense of deja-vu

[Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Jim Jewett
Greg Ewing asked: Would it help if an identifier were required to be made up of letters from the same alphabet, e.g. all Latin or all Greek or all Cyrillic, but not a mixture. Probably, yes, though there could still be problems mixing within a program. FWIW, the Opera web browser is already

Re: [Python-Dev] ? operator in python

2005-10-26 Thread Guido van Rossum
Dear Lucky, You are correct. Python 2.5 will have a conditional operator. The syntax will be different than C; it will look like this: (EXPR1 if TEST else EXPR2) (which is the equivalent of TEST?EXPR1:EXPR2 in C). For more information, see PEP 308 (http://www.python.org/peps/pep-0308.html).

[Python-Dev] CVS is read-only

2005-10-26 Thread Martin v. Löwis
I just switched the repository to read-only mode, and removed the test subversion installation. I'll let you know when the conversion is complete. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Martin v. Löwis
M.-A. Lemburg wrote: You even argued against having non-ASCII identifiers: http://mail.python.org/pipermail/python-list/2002-May/102936.html I see :-) It seems I have changed my mind since then (which apparently predates PEP 263). One issue I apparently was worried about was the plan to use

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Josiah Carlson
Martin v. Löwis [EMAIL PROTECTED] wrote: M.-A. Lemburg wrote: You even argued against having non-ASCII identifiers: http://mail.python.org/pipermail/python-list/2002-May/102936.html Do you really think that it will help with code readability if programmers are allowed to use

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Josiah Carlson
Martin v. Löwis [EMAIL PROTECTED] wrote: Josiah Carlson wrote: In this case it's not just a misreading, the characters look identical! When is an 'E' not an 'E'? When it is an Epsilon or Ie. Saying what characters will or will not be used as identifiers, when those characters are

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Martin v. Löwis
Josiah Carlson wrote: According to wikipedia (http://en.wikipedia.org/wiki/Latin_alphabet), various languages have adopted a transliteration of their language and/or former alphabets into latin. They don't purport to know all of the reasons why, and I'm not going to speculate. Whether or

[Python-Dev] Parser and Runtime: Divorced!

2005-10-26 Thread Evan Jones
After a few hours of tedious and frustrating hacking I've managed to separate the Python abstract syntax tree parser from the rest of Python itself. This could be useful for people who may wish to build Python tools without Python, or tools in C/C++. In the process of doing this, I came across

Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-26 Thread Greg Ewing
M.-A. Lemburg wrote: If you are told to debug a program written by say a Japanese programmer using Japanese identifiers you are going to have a really hard time. Or you could look upon it as an opportunity to broaden your mental horizons by learning some Japanese. :-) -- Greg Ewing,