Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Guido van Rossum
in a non-holistic way. This is trumped by the need to keep the standard library warning-free. But how about the following compromise: make it a silent deprecation in 2.5, and a full deprecation in 2.6. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Guido van Rossum
On 8/25/05, Raymond Hettinger [EMAIL PROTECTED] wrote: I wish Fredrik would chime in. He would have something pithy, angry, and incisive to say about this. Raymond, I'm sick of the abuse. Consider the PEP rejected. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-25 Thread Guido van Rossum
raise ValueError() The latter. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Guido van Rossum
not coincide with emitting warnings?) See Michael Chermside's post. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] PEP 342: simple example, closure alternative

2005-08-26 Thread Guido van Rossum
is very natural. For larger examples, I'd recommend defining a class as always. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-26 Thread Guido van Rossum
be written as if sub in s. This avoids the nasty bug in if s.find(sub). If .find is scheduled for the dustbin of history, I would be willing to suggest doc and docstring changes. (str.index.__doc__ currently refers to str.find.__doc__. This should be reversed.) -- --Guido van Rossum (home

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-26 Thread Guido van Rossum
convinced that we should do it. Also remember, the standard library is rather atypical -- while some of it makes great example code, other parts of it are highly contorted in order to either maintain backwards compatibility or provide an unusually high level of defensiveness. -- --Guido van Rossum

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-27 Thread Guido van Rossum
of two (short, good). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-27 Thread Guido van Rossum
-- consider what happens if optval *starts* with a semicolon. Also, the code is searching optval for ';' twice. Suggestion: if vi in ('=',':'): try: pos = optval.index(';') except ValueError: pass else: if pos 0 and optval[pos-1].isspace(): optval = optval[:pos] -- --Guido van Rossum

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-27 Thread Guido van Rossum
in 2.5. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-27 Thread Guido van Rossum
of to be removed? I'm glad you're not on *my* team. (Emphasis mine. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-27 Thread Guido van Rossum
to it! (Not to mention the 're' module.) However, after 12 years, I believe that the small benefit of having find() is outweighed by the frequent occurrence of bugs in its use. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python

Re: [Python-Dev] Python 3.0 blocks?

2005-08-27 Thread Guido van Rossum
On 8/27/05, Aahz [EMAIL PROTECTED] wrote: On Sat, Aug 27, 2005, Guido van Rossum wrote: if vi in ('=',':'): try: pos = optval.index(';') except ValueError: pass else: if pos 0 and optval[pos-1].isspace(): optval = optval[:pos] IIRC, one of your proposals

Re: [Python-Dev] info/advices about python readline implementation

2005-08-28 Thread Guido van Rossum
back to PyOS_StdioReadline to zero. It can't be a Python specific thing, because it doesn't have a 'Py' prefix. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-30 Thread Guido van Rossum
, /, c) That can't be confusing can it? (Just think of it as rpartition() stopping at the last occurrence, rather than searching from the right. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Proof of the pudding: str.partition()

2005-08-31 Thread Guido van Rossum
. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] import exceptions

2005-08-31 Thread Guido van Rossum
exceptions are builtin? I'm guessing this is a remnant from a transitional period around Python 1.5. Let's get rid of it. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] String views

2005-09-01 Thread Guido van Rossum
that was proven to be asymptotically optimal, but unfortunately was beat every time in practical applications by something much simpler, *and* the algorithm was so complex that we couldn't get the code 100% bugfree. But that was 20 years ago. -- --Guido van Rossum (home page: http://www.python.org

Re: [Python-Dev] Python 3 design principles

2005-09-01 Thread Guido van Rossum
to write list(d.keys()). How is the translator going to know? Worse, there's a common idiom: L = D.keys() L.sort() that should be replaced by L = sorted(D) how is the translator going to recognize that (given that there are all sorts of variations)? -- --Guido van Rossum (home page: http

Re: [Python-Dev] Revising RE docs

2005-09-01 Thread Guido van Rossum
regexps in your program that the cache is cleared (the limit is 100). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-01 Thread Guido van Rossum
with %6.2f. (In fact, the major complaint is about the one place where I *did* tinker with it -- %(boo)s.) Maybe the ${boo} form can be extended to allow ${boo%6.2f} ??? Unfortunately that would prevent a different extension of ${boo}: %{boo+far}. -- --Guido van Rossum (home page: http

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-01 Thread Guido van Rossum
work for assert because you don't want the argument to be evaluated in -O mode. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-02 Thread Guido van Rossum
the trailing newline or the space between items); would anyone support a proposal to make it a statement instead? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-03 Thread Guido van Rossum
someone can work this into the Wiki? (http://wiki.python.org/moin/PrintAsFunction) As I said, I'm flexible on all the details but I really want to get rid of the statement syntax for this functionality. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] iterators and extended function call syntax (WAS: Replacement for print in Python 3.0)

2005-09-03 Thread Guido van Rossum
. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-03 Thread Guido van Rossum
it. Same here. If anyone wants to give it a try, please go ahead! -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-03 Thread Guido van Rossum
to speak up now and volunteer as a co-author. I suggest the wiki as a place for working out drafts. I'm pulling out of the discussion until I see a draft PEP. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python

Re: [Python-Dev] Revising RE docs

2005-09-03 Thread Guido van Rossum
On 9/2/05, Gareth McCaughan [EMAIL PROTECTED] wrote: On Thursday 2005-09-01 18:09, Guido van Rossum wrote: They *are* cached and there is no cost to using the functions instead of the methods unless you have so many regexps in your program that the cache is cleared (the limit is 100

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-04 Thread Guido van Rossum
the replacement too, but that's where I need others to weigh in so we make sure all the important use cases are covered. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-04 Thread Guido van Rossum
engineering habits are dropped the moment people have to type a pair of extra parentheses. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] bug in urlparse

2005-09-04 Thread Guido van Rossum
. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-04 Thread Guido van Rossum
be syntactically related (within the realm of common sense, as always). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] gdbinit problem

2005-09-05 Thread Guido van Rossum
. You're probably one of the two users. :-) So don't hesitate. If the other user disagrees you two can fight it out in CVS. :) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-05 Thread Guido van Rossum
(...Not) rule. BTW we could use from __future__ import printing to disable the recognition of 'print' as a keyword in a particular module -- this would provide adequate future-proofing. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-05 Thread Guido van Rossum
(these are not the days of Fortran formatted output). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options

Re: [Python-Dev] gdbinit problem

2005-09-05 Thread Guido van Rossum
command language implements a break-like statement. Ah. Now you've heard from the other user. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Guido van Rossum
of the non-i18n use case, where the format isalmost always a string *literal* adjacent to the arguments. I'm not at all convinced that we should attempt to find a solution that handles both use cases; most Python code never needs i18n. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Guido van Rossum
the real code you need to do is already written as print(x =, x, y =, y, z =, z) and that becomes more readable when you transform it to printf(x = %s y = %s z = %s\n, x, y, z) -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Guido van Rossum
to arbitrary expressions, which I think is an extension that will get lots of requests. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] reference counting in Py3K

2005-09-06 Thread Guido van Rossum
of the few annoyances I have with Python. I know that Ruby somehow gets around the need for ref. counting. You could always use IronPython or Jython of course, neither of which has this. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Guido van Rossum
On 9/6/05, Michael Hudson [EMAIL PROTECTED] wrote: Gnyagh, couldn't you have *started* the thread with that post? :) I hadn't anticipated so many great minds rusted shut. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Guido van Rossum
framework. Remember YAGNI! -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python

Re: [Python-Dev] reference counting in Py3K

2005-09-06 Thread Guido van Rossum
with the Python source tree, to the point of contributing the code to the PSF? (Without giving up ownership or responsibility for its maintenance.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-07 Thread Guido van Rossum
principle. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-09 Thread Guido van Rossum
clearer to the reader whether we are writing binary or or text data. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] PEP 3000 and new style classes

2005-09-09 Thread Guido van Rossum
Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] PEP 3000 and iterators

2005-09-09 Thread Guido van Rossum
is determined by the module containing the code creating it, not the module containing the code using it. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] SIGPIPE = SIG_IGN?

2005-09-09 Thread Guido van Rossum
I was wondering, why are we setting SIGPIPE to SIG_IGN in initsigs(): Because you can get a SIGPIPE from writing to a socket whose other side has shut down, and we want to turn that into an error. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] IDLE development

2005-09-10 Thread Guido van Rossum
, your next chance will be 18 months later... -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] PEP 3000 and iterators

2005-09-11 Thread Guido van Rossum
compatibility. But just installing python3.0 as python and expecting nothing will break is not a goal -- it would be too constraining. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] PEP 3000 and iterators

2005-09-12 Thread Guido van Rossum
, write your code to iterate over the dict itself even if you'd like itervalues or iteritems; you can always get the value explicitly by indexing the dict. IOW use the API whose name will remain but don't rely on the functionality that will change. -- --Guido van Rossum (home page: http

[Python-Dev] Fwd: [Python-checkins] python/dist/src/Misc NEWS, 1.1193.2.94, 1.1193.2.95

2005-09-14 Thread Guido van Rossum
). ___ Python-checkins mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-checkins -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Term unification

2005-09-14 Thread Guido van Rossum
! ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] [Python-checkins] python/dist/src/Lib/test regrtest.py, 1.171, 1.172 test_ioctl.py, 1.2, 1.3

2005-09-14 Thread Guido van Rossum
of a UNIX user. The test_ioctl test case is calling the TIOCGPGRP ioctl, which returns the process group id, which is an attribute of the process. This has type pid_t, which is signed. I hope this clarifies the situation. I am glad to hear that it is checked in! Monte -- --Guido van Rossum (home

Re: [Python-Dev] removing nested tuple function parameters

2005-09-18 Thread Guido van Rossum
doing the natural transformation. (In fact, this would be one 2.x - 3.0 transformation that could easily be automated if you can handle making up less-than-optimal names for the arguments.) -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] possible memory leak on windows (valgrind report)

2005-09-19 Thread Guido van Rossum
PyArg_ParseTuple(args, s:...). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev

Re: [Python-Dev] possible memory leak on windows (valgrind report)

2005-09-19 Thread Guido van Rossum
] wrote: On 9/19/05, Guido van Rossum [EMAIL PROTECTED] wrote: That patch doesn't make sense to me -- the s code to PyArg_ParseTuple doesn't return newly allocated memory, it just returns a pointer into a string object that is owned by the caller (really by the call machinery I suppose

Re: [Python-Dev] removing nested tuple function parameters

2005-09-19 Thread Guido van Rossum
. Fair enough, though I'm not sure what use we can make of that information. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] and and or operators in Py3.0

2005-09-19 Thread Guido van Rossum
mistype when switching between languages... Also, this proposal needs to be considered together with the addition of a proper conditional operator, like x?y:z. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

[Python-Dev] Adding a conditional expression in Py3.0

2005-09-20 Thread Guido van Rossum
On 9/20/05, Michael Hudson [EMAIL PROTECTED] wrote: Guido van Rossum [EMAIL PROTECTED] writes: On 9/19/05, Raymond Hettinger [EMAIL PROTECTED] wrote: I propose that in Py3.0, the and and or operators be simplified to always return a Boolean value instead of returning the last evaluated

[Python-Dev] 2.4.2c1 fails test_unicode on HP-UX ia64

2005-09-20 Thread Guido van Rossum
('ascii','replace') 'Andr x' The test passes on Linux. We have about 6 hours until code freeze... -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] 2.4.2c1 fails test_unicode on HP-UX ia64

2005-09-20 Thread Guido van Rossum
This seems to disappear when I disable -O. I guess the HP-UX optimizer is as bad as it always was. Or perhaps we have an old version installed. Sorry! On 9/20/05, Guido van Rossum [EMAIL PROTECTED] wrote: I just built and ran the latest Python 2.4.2c1 from CVS on our HP-UX Itanium 2 box

[Python-Dev] test_ossaudiodev hangs

2005-09-20 Thread Guido van Rossum
This happens both with 2.4.2c1 and with 2.5a0 from current CVS. I know in order to debug you need more info about my audio device, but since I never use audio on Linux, you'll have to talk me through providing the info. I'm [EMAIL PROTECTED] on Google talk BTW. -- --Guido van Rossum (home page

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-20 Thread Guido van Rossum
On 9/20/05, Terry Reedy [EMAIL PROTECTED] wrote: Guido van Rossum [EMAIL PROTECTED] wrote in message and +1 on adding a conditional expression. I believe (y if x else z) was my favorite last time, wasn't it? No. That was your original proposal, which you later rejected. Thanks

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-20 Thread Guido van Rossum
colons in list comps and genexprs either.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-20 Thread Guido van Rossum
scale much better. All arguments for multi-processing and against multi-threading. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

[Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-20 Thread Guido van Rossum
? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-20 Thread Guido van Rossum
__len__() returns 0 but whose __nonzero__() returns True would be an anomaly. The best we can do IMO is to change it back in 2.5. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-20 Thread Guido van Rossum
implementing (as acquisition in Zope 2 has amply proved). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-20 Thread Guido van Rossum
approach is to code with that in mind. When this type of look-ahead is required, a buffering iterator should be inserted, so that the algorithm can work with all iterators rather than only with iterators over built-in containers. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-21 Thread Guido van Rossum
. QOTF candidate! (I wonder if this thread could be summarized into a PEP we can use instead of future discussions rehashing the same issues?) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-21 Thread Guido van Rossum
can't as a community agree on a syntax. That's what we have a BDFL for. =) Another QOTFcandidate! -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-21 Thread Guido van Rossum
be willing to entertain improvements that improve the insulation this provides. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-21 Thread Guido van Rossum
://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-21 Thread Guido van Rossum
On 9/21/05, Raymond Hettinger [EMAIL PROTECTED] wrote: [Guido van Rossum] Could you at least admit that this was an oversight and not try to pretend it was intentional breakage? Absolutely. I completely missed this one. Thanks; spoken like a man. I strongly feel that this needs

[Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-21 Thread Guido van Rossum
/darwinsource/ it is clear that OS X 10.a.b corresponds to Darwin (a+4).b, except for OS X versions = 10.1. I'd be happy to write the code and add it to system_alias() in platform.py. Is this a good idea? -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-21 Thread Guido van Rossum
On 9/21/05, Guido van Rossum [EMAIL PROTECTED] wrote: The platform module has a way to map system names such as returned by uname() to marketing names. It maps SunOS to Solaris, for example. But it doesn't map Darwin to Mac OS X. I think I know how to map Darwin version numbers to OS X version

Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

2005-09-22 Thread Guido van Rossum
a generator? (I know, the answer is buffering. But that has problems too. It was all considered when we designed it.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Guido van Rossum
Thanks all! I won't touch it. /usr/bin/sw_vers is the way to go. On 9/22/05, M.-A. Lemburg [EMAIL PROTECTED] wrote: Ronald Oussoren wrote: On 22-sep-2005, at 5:26, Guido van Rossum wrote: The platform module has a way to map system names such as returned by uname() to marketing names

Re: [Python-Dev] Visibility scope for for/while/if statements

2005-09-22 Thread Guido van Rossum
Please end this thread. It belongs in c.l.py. Nothing's going to change. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Visibility scope for for/while/if statements

2005-09-22 Thread Guido van Rossum
. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] RFC: readproperty

2005-09-28 Thread Guido van Rossum
defaultproperty? (Sorry to turn this into a naming game, which is bound to produce 100s of competing proposals that are totally unintuitive except to the proposer. But naming is important.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python

Re: [Python-Dev] RFC: readproperty

2005-09-28 Thread Guido van Rossum
-- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Guido van Rossum
: type = 'I' if file else 'D' xdrlib.py: print 'succeed' if pred(x) else 'failed', ':', x xmlrpclib.py: write(1 if value else 0) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Guido van Rossum
On 9/29/05, Guido van Rossum [EMAIL PROTECTED] wrote: [a garbled list] Stupid gmail broke the lines. Here it is again as an attachment. -- --Guido van Rossum (home page: http://www.python.org/~guido/) XifCelseY.py Description: application/python

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Guido van Rossum
somethingElse not-expecting-this-to-fly-ly y'rs - steve Let me give you what you expect. If all the X if C else Y syntax does is prevent that atrocity from ever being introduced, it would be worth it. :) -- --Guido van Rossum (home page: http://www.python.org/~guido

[Python-Dev] David Mertz on CA state e-voting panel

2005-09-29 Thread Guido van Rossum
http://yro.slashdot.org/yro/05/09/28/1955256.shtml?tid=103tid=17tid=219 Congratulations David! (Don't have his email.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Guido van Rossum
original instinct to omit conditional expressions was right! Now you've pushed me over the edge. I've made up my mind now, X if C else Y it will be. I hope to find time to implement it in Python 2.5. Let it be as controversial as bool or @decorator, I don't care. -- --Guido van Rossum (home page: http

[Python-Dev] Conditional Expression Resolution

2005-09-29 Thread Guido van Rossum
. Congratulations gracefully accepted. It's still my language! :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] PEP 350: Codetags

2005-09-30 Thread Guido van Rossum
functionality, naturally). Maybe I'm just an old fart, but this all seems way over-engineered. Even for projects the size of Python, a simple grep+find is sufficient. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing

Re: [Python-Dev] linecache problem

2005-09-30 Thread Guido van Rossum
the PIL directory on sys.path? Anyway, don't hesitate to suggest a patch on sourceforge -- python-dev really isn't the forum for further discussion of this issue. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

Re: [Python-Dev] Pythonic concurrency - cooperative MT

2005-09-30 Thread Guido van Rossum
is in the way for these types of apps. So whatever innovatice concurrency scheme Python may come out, it should still be mixable with more traditional concurrency schemes, because required properties vary wildly even inside a single app. I don't think you've proved that yet. -- --Guido van

Re: [Python-Dev] bool(container) [was bool(iter([])) changed between 2.3 and 2.4]

2005-09-30 Thread Guido van Rossum
is a container (at least every object with a __dict__ attribute) and you sure don't want to map __len__ to self.__dict__.__len__... -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] PEP 350: Codetags

2005-09-30 Thread Guido van Rossum
van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Why does __getitem__ slot of builtin call sequence methods first?

2005-10-01 Thread Guido van Rossum
was in the midst of it. However, I wonder if the logic isn't such that if you define both sq_item and mp_subscript, __getitem__ calls sq_item; I wonder if by removing sq_item it might call mp_subscript? Worth a try, anyway. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] PEP 343 and __with__

2005-10-03 Thread Guido van Rossum
. -- Måns Nilsson, asr ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (home

Re: [Python-Dev] bytes type

2005-10-03 Thread Guido van Rossum
as possible. There won't be a literal for it. But you will be able to convert between bytes and strings quite easily by specifying an encoding. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] bytes type

2005-10-03 Thread Guido van Rossum
. On 10/3/05, Antoine Pitrou [EMAIL PROTECTED] wrote: Le lundi 03 octobre 2005 à 14:02 -0700, Guido van Rossum a écrit : On 10/3/05, Antoine Pitrou [EMAIL PROTECTED] wrote: Could the bytes type be just the same as the current str type but without the implicit unicode conversion ? Or am I

Re: [Python-Dev] PEP 343 and __with__

2005-10-04 Thread Guido van Rossum
passing the Python 2.4 test suite, I'm wondering if it should be bumped from the feature list again. What do you want me to say about the AST branch? It's not my branch, I haven't even checked it out, I'm just patiently waiting for the folks who started it to finally finish it. -- --Guido van Rossum

Re: [Python-Dev] PEP 343 and __with__

2005-10-04 Thread Guido van Rossum
). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

<    1   2   3   4   5   6   7   8   9   10   >