Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Thomas Wouters
On 3/15/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: My worry focuses on new-timers and SyntaxErrors. The worst part of the new user experience is encountering a SyntaxError. Please. I already said it would be a SyntaxError *with explanation*. It's pretty easy to make a syntax error that

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Georg Brandl
Thomas Wouters schrieb: > > > On 3/15/07, *Raymond Hettinger* <[EMAIL PROTECTED] PROTECTED]>> > wrote: > > My worry focuses on new-timers and SyntaxErrors. The worst part of > the new user experience is encountering a SyntaxError. > > > Please. I already said it woul

Re: [Python-3000] Metaclasses in Python 3000: Draft 2

2007-03-15 Thread Talin
Guido van Rossum wrote: > While you're at it, could you also add a pointer to this patch as a > sample implementation? > > http://python.org/sf/1681101 > > It's far from complete at this point; so far, I've got the syntax > working and it seems to compile old code just fine, but the keyword > arg

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Thomas Wouters
On 3/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote: Until now, I skipped the octal thread. Now I read this and wondered, "what the hell is 0t6065 supposed to mean" and only from the context I gathered that it would be an octal literal... Seriously, nobody, even coming from another language, wil

Re: [Python-3000] Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Nicko van Someren
On 14 Mar 2007, at 23:08, Guido van Rossum wrote: > IOW, the only thing I'm unsure about is whether int('0012', 0) should > return 10 or complain like eval('0012') would. Perhaps it's best to > say that int('0012', 0) is a safer way to parse Python int literals, > and that would make it an error.

[Python-3000] I18N identifiers

2007-03-15 Thread Martin v. Löwis
What is the status of I18N identifiers? Has any progress been made? If not, I'd like to write a PEP, and mentor a SoC student to work on that (if one shows up). Regards, Martin ___ Python-3000 mailing list [email protected] http://mail.python.org/ma

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 14, 2007, at 8:33 PM, Guido van Rossum wrote: > While I would agree in an ideal world, I find Thomas's argument > compelling. Not all newbie Python users are first-time computer users; > if they have C/C++ or other Unixoid languages under their

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-15 Thread Nicko van Someren
On 15 Mar 2007, at 04:33, Tony Lownds wrote: > Does **kwds need to be passed to prepare and also to metaclass > constructor? > Removing that would make it easier to provide nice error messages. > Custom __prepare__ > implementations can always store the **kwds that are needed in or > on the > d

Re: [Python-3000] PEP for Metaclasses in Python 3000

2007-03-15 Thread Jim Jewett
On 3/9/07, Talin <[EMAIL PROTECTED]> wrote: > Note that the Python interpreter will check to insure that the > __metacreate__ attribute exists before calling it. This preserves > backwards compatibility with existing metaclasses. You might want to be even more explicit and say If t

Re: [Python-3000] metaclass syntax [was: Discussions with no PEPs]

2007-03-15 Thread Jim Jewett
(reasons to use a custom dict, other than ordering) > > (1) immutable class dictionaries. These are typical for > > extension classes, but a real pain for python classes. > > (2) almost-immutable -- with callbacks when values are > > added/changed/deleted. > > (3) actually-private variables

Re: [Python-3000] Removing sys.exitfunc

2007-03-15 Thread Collin Winter
On 3/8/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Rename it to sys._exitfunc? Georg and I have independently reimplemented atexit in C: see patch #1680961. Collin Winter ___ Python-3000 mailing list [email protected] http://mail.python.org/m

Re: [Python-3000] Metaclasses in Python 3000: Draft 2

2007-03-15 Thread Phillip J. Eby
At 12:13 PM 3/15/2007 +1300, Greg Ewing wrote: >Phillip J. Eby wrote: > > > So the subset required is determined entirely by what the class body > > (and metaclass __new__) require. > >Perhaps the PEP should say something to the effect that >get, set and delete need to be implemented in order to >s

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-15 Thread Phillip J. Eby
At 06:26 PM 3/14/2007 -0700, Guido van Rossum wrote: >(It's a slightly >different function than currently; the current function *returns* the >locals, while the new one *takes* the locals as an argument; instead >of a LOAD_LOCALS opcode we need a STORE_LOCALS opcode.) Wouldn't it suffice to exec a

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Mattias Engdegård
Georg Brandl <[EMAIL PROTECTED]> writes: >Seriously, nobody, even coming from another language, will be able to look at >it >and say, "yes, that's an octal literal." Scientific googling reveals that most other languages that use 0x for hex use 0b for binary and either 0o or 0 for octal, so if "c

Re: [Python-3000] Removing sys.exitfunc

2007-03-15 Thread Guido van Rossum
OK, if you two agree on what to do, just go ahead! On 3/15/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 3/8/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Rename it to sys._exitfunc? > > Georg and I have independently reimplemented atexit in C: see patch #1680961. > > Collin Winter > -

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-15 Thread Guido van Rossum
On 3/15/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 06:26 PM 3/14/2007 -0700, Guido van Rossum wrote: > >(It's a slightly > >different function than currently; the current function *returns* the > >locals, while the new one *takes* the locals as an argument; instead > >of a LOAD_LOCALS opcod

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Guido van Rossum
On 3/15/07, Mattias Engdegård <[EMAIL PROTECTED]> wrote: > Scientific googling reveals that most other languages that use 0x for hex use > 0b for binary and either 0o or 0 for octal, so if "cultural compatibility" > is important, this may influence the choice. > > Whatever prefix is used, it should

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Guido van Rossum
On 3/15/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > My main interest is that we should move away from just leading zero as > octal, disallow leading zero altogether because of the confusion it > would cause for folks coming from other neutral about the choice > between 0o, 0c or 0t. Somethin

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Georg Brandl
Guido van Rossum schrieb: > On 3/15/07, Mattias Engdegård <[EMAIL PROTECTED]> wrote: >> Scientific googling reveals that most other languages that use 0x for hex use >> 0b for binary and either 0o or 0 for octal, so if "cultural compatibility" >> is important, this may influence the choice. >> >> W

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Patrick Maupin
On 3/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > My concern is that I don't want to have to write something like > > x = 0t755 # octal literal > > because then I can also write > > x = 493 # 0755 in octal But, in general, code comments about how Python works are to be discouraged. If 0t755

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Daniel Stutzbach
On 3/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > My concern is that I don't want to have to write something like > > x = 0t755 # octal literal > > because then I can also write > > x = 493 # 0755 in octal > > and don't need octal literals at all. The later is error-prone and might be hard t

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Stephen Hansen
On 3/15/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: I'm neutral about the choice between 0o, 0c or 0t. Interested Lurker Opinion: Can it be a "small" character? 0x1 leaps out for me because of the fact that numbers are all "tall" and the x is short-- so having that difference in height ma

Re: [Python-3000] Octal

2007-03-15 Thread Tim Peters
[Guido] > Something got lost there in a last-minute edit. I meant to say: > > My main interest is that we should move away from just leading zero as > octal; that we should disallow leading zero altogether because of the > confusion it would cause for folks coming from other languagesl and > that w

Re: [Python-3000] Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Terry Reedy
"Nicko van Someren" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On 14 Mar 2007, at 23:08, Guido van Rossum wrote: | > IOW, the only thing I'm unsure about is whether int('0012', 0) should | > return 10 or complain like eval('0012') would. Perhaps it's best to | > say that int('0

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Terry Reedy
"Stephen Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On 3/15/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: | > | > I'm neutral about the choice between 0o, 0c or 0t. | | | Interested Lurker Opinion: Can it be a "small" character? 0x1 leaps out for | me because of the

Re: [Python-3000] Metaclasses in Python 3000: Draft 2

2007-03-15 Thread Guido van Rossum
On 3/15/07, Talin <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > While you're at it, could you also add a pointer to this patch as a > > sample implementation? > > > > http://python.org/sf/1681101 > > That is way cool. It is now way cooler -- it *works*! The build_class function is imple

Re: [Python-3000] Octal

2007-03-15 Thread Patrick Maupin
On 3/15/07, Tim Peters <[EMAIL PROTECTED]> wrote: > 2r1010 > 4r22 > 8r12 > 16ra (or) 16rA > Part of me would miss 0xABCD terrbly, but I like the concept. The only real rub is the impending huge discussion about the number of allowed radices. The max 36 radix currently supported

Re: [Python-3000] Octal

2007-03-15 Thread Guido van Rossum
Please. No discussion of generalized radixes. Also, IMO Tim's proposal changes too much; there's nothing wrong with 0b and 0x. On 3/15/07, Patrick Maupin <[EMAIL PROTECTED]> wrote: > On 3/15/07, Tim Peters <[EMAIL PROTECTED]> wrote: > > > 2r1010 > > 4r22 > > 8r12 > > 16ra (or) 16r

Re: [Python-3000] Metaclasses in Python 3000: Draft 2

2007-03-15 Thread Greg Ewing
Phillip J. Eby wrote: > > Maybe the PEP should specify a protocol that the > > pseudo-dict must provide for doing this, such as an > > iteritems() method (or whatever the Py3k equivalent > > is). > > That's not necessary; the metaclass instance __call__ (or class __new__) > should be responsible

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Greg Ewing
Guido van Rossum wrote: > I'm > somewhat uncomfortable with 0o because the zero in some fonts is about > the same size as a lowercase oh; You already have to be careful what font you use for programming with, so I don't think that's a serious problem. More serious is that if we want to be consist

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Greg Ewing
Georg Brandl wrote: > because then I can also write > > x = 493 # 0755 in octal and provide a chance for the code to get out of step with the comment. -- Greg ___ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Greg Ewing
Stephen Hansen wrote: > Interested Lurker Opinion: Can it be a "small" character? 0q123 # oqtal Other available short or short-with-stalk letters: 0w123 0r123 0u123 0p123 0a123 0s123 0d123 0g123 0h123 0k123 0z123 0v123 0n123 0m123 -- Greg

Re: [Python-3000] Octal

2007-03-15 Thread Greg Ewing
Patrick Maupin wrote: > The max 36 radix currently supported by int() is > numerically suspiciously similar to the sum of the number of ASCII > digit characters and the number of same-case ASCII letters What would you use for digits in bases higher than 36? Most of the ASCII punctuation is already

Re: [Python-3000] Octal

2007-03-15 Thread Patrick Maupin
On 3/15/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > What would you use for digits in bases higher > than 36? Most of the ASCII punctuation is already > taken... start plundering unicode for more > alphabets? I'm not suggesting that the number of supported bases should grow AT ALL. What I am sugge

Re: [Python-3000] Octal

2007-03-15 Thread Patrick Maupin
On 3/15/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Please. No discussion of generalized radixes. I agree. I was just stating the obvious that, if we allow 16r100, somebody will ask why not 21r100. > > Also, IMO Tim's proposal changes too much; there's nothing wrong with 0b and > 0x. 0b

Re: [Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

2007-03-15 Thread Georg Brandl
Greg Ewing schrieb: > Guido van Rossum wrote: >> I'm >> somewhat uncomfortable with 0o because the zero in some fonts is about >> the same size as a lowercase oh; > > You already have to be careful what font you use for > programming with, so I don't think that's a serious > problem. I agree. >