Re: [Python-3000] sizeof(size_t) < sizeof(long)

2008-04-17 Thread Martin v. Löwis
> So it's a de facto standard, and one that works perfectly > well. Going against it is both futile and unnecessary, > as far as I can see. Is python-3000 really the right place to debate the wording of the C standard? Now that you know what it says, you should accept that it does say that. If yo

Re: [Python-3000] end scope of iteration variables after loop

2008-04-17 Thread Amaury Forgeot d'Arc
Nicholas T wrote: > hello all, > >A few times in practice I have been tripped up by how Python keeps > variables in scope after a loop--and it wasn't immediately obvious what the > problem was. I think it is one of the ugliest and non-intuitive features, > and hope some others agree that it sho

Re: [Python-3000] Recursive str

2008-04-17 Thread Oleg Broytmann
On Thu, Apr 17, 2008 at 01:36:54PM +1200, Greg Ewing wrote: > Oleg Broytmann wrote: > > Do I understand it right that str(objects) calls repr() on items to > > properly quote strings? (str([1, '1']) must give "[1, '1']" as the result). > > Is it the only reason? > > In the case of strings, yes. Mo

Re: [Python-3000] [OT] sizeof(size_t) < sizeof(l ong)

2008-04-17 Thread Antoine Pitrou
James Y Knight fuhm.net> writes: > On Apr 16, 2008, at 11:00 PM, Greg Ewing wrote: > > > If a word is needed for this concept, then invent a new > > one, e.g. "size unit", rather than reusing "byte", which > > everyone already understands as meaning 8 bits. > > Nope. Everyone understands "octet"

Re: [Python-3000] Displaying strings containing unicode escapes at the interactive prompt

2008-04-17 Thread Nick Coghlan
atsuo ishimoto wrote: > Question: Are you happy if you are forced to live with these hacks forever? > If not, why do you think I'll accept your suggestion? If they worked, I'd be happy to use them wherever they made my life easier. They don't work though, so the point is rather moot. I think att

Re: [Python-3000] Displaying strings containing unicode escapes at the interactive prompt

2008-04-17 Thread Nick Coghlan
Guido van Rossum wrote: > On Wed, Apr 16, 2008 at 10:20 PM, Greg Ewing > <[EMAIL PROTECTED]> wrote: >> Alex Martelli wrote: >> > I disagree: I always recommend using %r to display (in an error >> > message, log entry, etc), a string that may be in error, >> >> For debugging messages, yes, but no

Re: [Python-3000] Recursive str

2008-04-17 Thread Jim Jewett
I think asking every container type to implement str just to ensure its subobjects are printed correctly is a losing proposition. It might be possible for repr to take an extra keyword argument indicating that it is being used in place of string. Then, when it recurses on subobjects, it should ca

Re: [Python-3000] Displaying strings containing unicode escapes at the interactive prompt

2008-04-17 Thread Guido van Rossum
On Thu, Apr 17, 2008 at 5:23 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > Regarding printable characters outside > > the ASCII range, see my post in another thread (which somehow nearly > > everybody appears to have missed); > Sorry, it got a "Usenet nod" from me afte

Re: [Python-3000] end scope of iteration variables after loop

2008-04-17 Thread Guido van Rossum
The substance of this discussion has already be answered by Amaury. I'd also like to remind everyone that at this point we're trying to get 3.0 (*and* 2.6!) stable enough to release by September 3rd. That's about 4.5 months away only! We should not be considering major language changes at this po

Re: [Python-3000] Displaying strings containing unicode escapes

2008-04-17 Thread atsuo ishimoto
> I expect that this will require some more research and agreement. > Perhaps someone can produce a draft PEP and attempt to sort out the > details of specification and implementation? It would also be nice if > it could be friendly to Jython, IronPython and PyPy. I'll write a draft PEP, if pe

Re: [Python-3000] [OT] sizeof(size_t) < sizeof(l ong)

2008-04-17 Thread Bill Janssen
> And in French, the only word for "byte" is... "octet" ;-) Well, you can always use "byte". We won't mind :-). Bill ___ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.pytho

Re: [Python-3000] Displaying strings containing unicode escapes

2008-04-17 Thread Stephen J. Turnbull
atsuo ishimoto writes: > I'll write a draft PEP, if people can stand my awful English. For me, > writing a long document in English is harder and more time-consuming > job than you might expect. So please be patient. I'll write a PEP as > fast as I can. I'd be happy to help. I don't have t

Re: [Python-3000] sizeof(size_t) < sizeof(long)

2008-04-17 Thread Greg Ewing
Adam Olsen wrote: > Sure, *now*, but C inherited their definition from a day when it > wasn't so clear cut. It may be obsolete today, but good luck getting > them to change the standard. I'm not really expecting the standard to be changed. But I do think it's silly for a modern C implementation

Re: [Python-3000] Displaying strings containing unicode escapes

2008-04-17 Thread Martin v. Löwis
> I do think we should use some kind of Unicode-standard-endorsed > definition of "printable" (as long as it excludes all ASCII escapes), I think unicodedata.category(c)[0] != "C" is fairly close. That excludes control characters (Cc), format characters (Cf), surrogates (Cs), private-use (Co)

Re: [Python-3000] Recursive str

2008-04-17 Thread Greg Ewing
Oleg Broytmann wrote: >When I use str(container) instead of repr(comtainer) does Python need to > guess if I want an unambiguous representation or a printable representation > of items? I don't think there is a room for guessing - I explicitly said > str(). But there's no single, obvious way