Re: [Python-Dev] Re: 2.4 news reaches interesting places

2004-12-11 Thread Guido van Rossum
need them, and this is not something that typically worries managers. But the perception of Python as slow does worry managers. (Wish I could add more to this thread but my family is calling...) -- --Guido van Rossum (home page: http://www.python.org/~guido

[Python-Dev] Python for Series 60 released

2004-12-22 Thread Guido van Rossum
Python runs on Nokia cell phones (the high-end ones, anyway) and has support from Nokia! Pretty cool all around. -- --Guido van Rossum (home page: http://www.python.org/~guido/) -- Forwarded message -- From: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wed, 22 Dec 2004 11:59:55

Re: [Python-Dev] Patches: 1 for the price of 10.

2004-12-22 Thread Guido van Rossum
Apparently file.seek doesn't have this DeprecationWarning though.. Strange, that. f.seek(3.6) f.tell() 3L That's a bug. Who'll fix it? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Website documentation - link to descriptor information

2004-12-23 Thread Guido van Rossum
It turns out the major mistake I made was to start from docs.python.org instead of www.python.org/doc. If you ask me that wasn't your mistake but the mistake of whoever decided to create a subdomain for docs (or for anything else). -- --Guido van Rossum (home page: http://www.python.org

[Python-Dev] Merry Christmas and a Happy New Year to all Python developers!

2004-12-24 Thread Guido van Rossum
of the dark season, and I hope to see many of you at the upcoming PyCon conference. Cheers! -- --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] Zipfile needs?

2005-01-02 Thread Guido van Rossum
0xL at crucial points in the code (for unsigned 32-bit ints) with an additional if x 0x8000L: x -= 0x1L to simulate signed 32-bit ints. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

Re: [Python-Dev] Darwin's realloc(...) implementation never shrinks allocations

2005-01-03 Thread Guido van Rossum
that I recall writing using these tends to start with a guaranteed-to-fit overallocation, and a single resize at the end. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

[Python-Dev] Please help complete the AST branch

2005-01-03 Thread Guido van Rossum
developers don't want Larry writing code any more. :-) Please, anyone? Raymond? Neil? Facundo? Brett? -- --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] super() harmful?

2005-01-04 Thread Guido van Rossum
keywords on to super. But that's not the same as calling it harmful. :-( -- --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] ast branch pragmatics

2005-01-05 Thread Guido van Rossum
plans sound good, I'll get started on the new branch. +1 -- --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] an idea for improving struct.unpack api

2005-01-08 Thread Guido van Rossum
(not enough data for format) # if data is too long that would be a bug in buf[pos:size] and cause an error below ret = unpack(fmt, data) ret = ret + (end,) return ret -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev

Re: [Python-Dev] PEP 246, redux

2005-01-10 Thread Guido van Rossum
simplistic alternative proposal is to simply include interfaces in the list of bases in the class statement; the metaclass can then sort it out). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Re: PEP 246: LiskovViolation as a name

2005-01-11 Thread Guido van Rossum
that for UnboundLocalError, which subclasses NameError. Perhaps we can rename NameError to UnboundVariableError (and add NameError as an alias for b/w compat). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] PEP 246, redux

2005-01-12 Thread Guido van Rossum
) and combine them. *In practice*, is this a benefit or a liability? -- --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 246, redux

2005-01-12 Thread Guido van Rossum
in today's python if one leaves the type declarations out. I don't think anybody is served by forbidding 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] PEP 246, redux

2005-01-12 Thread Guido van Rossum
of the semantics should be specified (at least the default behavior, even if there are hooks to change this). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: getattr and __mro__ (was Re: [Python-Dev] PEP 246, redux)

2005-01-12 Thread Guido van Rossum
with obj.__class__.__dict__. -- --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] PEP 246, redux

2005-01-12 Thread Guido van Rossum
the default don't consider, so only people who have to deal with the multiple A's and/or multiple C's all adaptable via the same B could save themselves some typing by turning it on. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev

Re: getting special from type, not instance (was Re: [Python-Dev] copy confusion)

2005-01-13 Thread Guido van Rossum
was to change: conform = getattr(type(obj), '__conform__', None) into: for basecls in type(obj).__mro__: if '__conform__' in basecls.__dict__: conform = basecls.__dict__['__conform__'] break else: # not found -- --Guido van Rossum (home page: http

Re: [Python-Dev] Exceptions *must*? be old-style classes?

2005-01-15 Thread Guido van Rossum
for this? I think there should be.) -- --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] PEP 246, Feedback Request

2005-01-16 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

[Python-Dev] Getting rid of unbound methods: patch available

2005-01-16 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] Getting rid of unbound methods: patch available

2005-01-17 Thread Guido van Rossum
of cleverness in the pyclbr test (and the fact that I wrote it myself) I'm not worried about widespread use of im_class on unbound methods. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Getting rid of unbound methods: patch available

2005-01-17 Thread Guido van Rossum
depends on 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/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Exceptions *must*? be old-style classes?

2005-01-17 Thread Guido van Rossum
reasonable to require new ones to inherit from Exception. That would be much more reasonable if Exception itself was a new-style class. As long as it isn't, you'd have to declare new-style classes like this: class MyError(Exception, object): ... which is ugly. -- --Guido van Rossum (home

Re: [Python-Dev] Exceptions *must*? be old-style classes?

2005-01-17 Thread Guido van Rossum
class. -- --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] Getting rid of unbound methods: patch available

2005-01-17 Thread Guido van Rossum
in which the function was defined. -- --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] Exceptions *must*? be old-style classes?

2005-01-17 Thread Guido van Rossum
. The question is of course how small the remaining minority is.) -- --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] Getting rid of unbound methods: patch available

2005-01-18 Thread Guido van Rossum
create a metaclass that sticks the attribute you want on the function objects. -- --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] Getting rid of unbound methods: patch available

2005-01-18 Thread Guido van Rossum
approaches that insist on im_class being there will have a diminishing value in the future. -- --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] Updated Monkey Typing pre-PEP

2005-01-20 Thread Guido van Rossum
, which doesn't strike me as such a great idea. -- --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] Getting rid of unbound methods: patch available

2005-01-20 Thread Guido van Rossum
!), and making staticmethod callable would add more code without much benefits. I recommend that you work around it by setting the default to None and substituting the real default in the function. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Updated Monkey Typing pre-PEP

2005-01-20 Thread Guido van Rossum
conservative that either returns the original object or raises an exception). What do you need then? [My plane is about to leave, gotta run!] -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Allowing slicing of iterators

2005-01-24 Thread Guido van Rossum
the islice iterator, what's the point? It seems to me that introducing this notation would mostly lead to confuse users, since in most other places a slice produces an independent *copy* of the data. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Guido van Rossum
are not sequences and shouldn't be confused with such. -- --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] Patch review: [ 1009811 ] Add missing types to__builtin__

2005-01-27 Thread Guido van Rossum
approval, so that's what I wrote a patch for. It sounds like it's getting pretty strong no votes this time around, however. Therefore, I would like to suggest option #3, with newmodule being, say, 'internals'. +1 -- --Guido van Rossum (home page: http://www.python.org/~guido

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/idlelib EditorWindow.py, 1.65, 1.66 NEWS.txt, 1.53, 1.54 config-keys.def, 1.21, 1.22 configHandler.py, 1.37, 1.38

2005-01-27 Thread Guido van Rossum
'] } if keySetName: for event in keyBindings.keys(): ___ Python-checkins mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-checkins -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Getting rid of unbound methods: patch available

2005-01-28 Thread Guido van Rossum
withdrew the patch, due to the large amount of code that would break due to the missing im_class attribute -- all fixable, but enough not to want to break it all when 2.5 comes out. So I'm salting the idea up for 3.0. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Database import problems

2005-02-01 Thread Guido van Rossum
a private reply pointing out the line sys.modules['path'] = path in os.py. -- --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

[Python-Dev] Wanted: members for Python Security Response Team

2005-02-03 Thread Guido van Rossum
responsibilities and procedures, please follow up here. -- --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] Re: python/dist/src/Lib rfc822.py,1.78,1.79

2005-02-08 Thread Guido van Rossum
), *then* refactor. Yes, this would be less fun. It's not supposed to be fun. It's supposed to avoid breaking code. Raymond, please roll back that change until this is taken care of. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev

Re: [Python-Dev] Clarification sought about including a multidimensional array object into Python core

2005-02-09 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] Re: Numeric life as I see it

2005-02-09 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] Exceptions *must*? be old-style classes?

2005-02-15 Thread Guido van Rossum
be done anyway). What I said. :-) -- --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] [ python-Bugs-1124637 ] test_subprocess is far too slow (fwd)

2005-02-17 Thread Guido van Rossum
sure it runs with -u all. -- --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] Fixing _PyEval_SliceIndex so that integer-like objects can be used

2005-02-18 Thread Guido van Rossum
float has that method, it would allow floats to be used as slice indices, but that's not supposed to work (to protect yourself against irreproducible results due to rounding errors). -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Requesting that a class be a new-style class

2005-02-19 Thread Guido van Rossum
to declaring new-style classes.) -- --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] Eliminating the block stack (was Re: Store x Load x -- DupStore)

2005-02-20 Thread Guido van Rossum
should be able to lose the block stack now, too. Somewhat ironically, eliminating the block stack will reduce the stack frame size, while eliminating the dict for locals added to it. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] UserString

2005-02-21 Thread Guido van Rossum
was recovering from a week of illness.) -- --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] Comment regarding PEP 328

2005-02-24 Thread Guido van Rossum
try to produce a working implementation (using import hooks so you can write the whole thing in Python). This is likely to clarify many of the semantic problems that I have tried to hint at. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Comment regarding PEP 328

2005-02-24 Thread Guido van Rossum
would find out for himself while doing the assigned homework of writing an implementation, saving him the effort of writing a PEP. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] @deprecated (was: Useful thread project for 2.5?)

2005-03-09 Thread Guido van Rossum
. The advantage is that you get a deprecation warning just by looking up the object. Yeah, but not everybody has Zope's proxying machinery. I think you're overreacting. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev

[Python-Dev] Adding any() and all()

2005-03-10 Thread Guido van Rossum
See my blog: http://www.artima.com/forums/flat.jsp?forum=106thread=98196 Do we even need a PEP or is there a volunteer who'll add any() and all() for me? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

Re: [Python-Dev] Adding any() and all()

2005-03-11 Thread Guido van Rossum
(). There are others slated for disappearance, too. -- --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] comprehension abbreviation (was: Adding any() and all())

2005-03-13 Thread Guido van Rossum
stop calling it 'ternary expression'. That doesn't explain what it means. It's as if we were to refer to the + operator as 'binary expression'. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

[Python-Dev] Rationale for sum()'s design?

2005-03-13 Thread Guido van Rossum
and rejected with a good reason; then I can post that to the blog (where the deficiency in sum() is being berated a bit excessively). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-13 Thread Guido van Rossum
[Guido van Rossum] - the identity (defaulting to 0) if the sequence is empty - the first and only element if the sequence only has one element - (...(((A + B) + C) + D) + ...) if the sequence has more than one element [Greg Ewing] While this might be reasonable if the identity argument

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-14 Thread Guido van Rossum
inside something *it* invoked). -- --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] Rationale for sum()'s design?

2005-03-14 Thread Guido van Rossum
in sequence_of_lists: total += sum(lst) and I think that's actually clearer (since the reader doesn't have to know about the 2nd argument's meaning). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-15 Thread Guido van Rossum
On Tue, 15 Mar 2005 22:21:07 +1000, Nick Coghlan [EMAIL PROTECTED] wrote: Guido van Rossum wrote: I think the conclusion should be that sum() is sufficiently constrained by backwards compatibility to make fixing it impossible before 3.0. But in 3.0 I'd like to fix it so that the 2nd

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-15 Thread Guido van Rossum
it impossible before 3.0. It seems wrong to be talking about fixing sum so soon after it was introduced. 3.0 is soon?!? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-16 Thread Guido van Rossum
being more specific. -- --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

[Python-Dev] Python 2.4 won the Jolt productivity award last night

2005-03-17 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.org/sf URLs aren't working? Re: [Python-Dev] Weekly Python Patch/Bug Summary

2005-03-31 Thread Guido van Rossum
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/) ___ Python-Dev

[Python-Dev] PyCon 2005 keynote on-line

2005-04-15 Thread Guido van Rossum
http://python.org/doc/essays/ppt/ -- scroll to the end. -- --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] Inconsistent exception for read-only properties?

2005-04-17 Thread Guido van Rossum
that doesn't have anything to do with the problem we're trying to solve). -- --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] Inconsistent exception for read-only properties?

2005-04-17 Thread Guido van Rossum
objections in the next few days, I will take this as a pronouncement and make the change at least in 2.5 and 2.4. You meant 2.5 only of course. It's still a new feature and as such can't be changed in 2.4. -- --Guido van Rossum (home page: http://www.python.org/~guido

[Python-Dev] Fwd: CFP: DLS05: ACM Dynamic Languages Symposium

2005-04-18 Thread Guido van Rossum
--- - Gilad Bracha - Wolfgang De Meuter - Stephane Ducasse - Gopal Gupta - Robert Hirschfeld - Dan Ingalls - Yukihiro Matsumoto - Mark Miller - Eliot Miranda - Philippe Mougin - Oscar Nierstrasz - Dave Thomas - David Ungar - Guido Van Rossum - Peter Van Roy - Jon L White (G) - Roel Wuyts

Re: [Python-Dev] anonymous blocks

2005-04-19 Thread Guido van Rossum
, and even shorter! If we apply this to the anonymous block problem, we may end up finding lambda the ultimate compromise -- like a gentleman in the back of my talk last week at baypiggies observed (unfortunately I don't know his name). -- --Guido van Rossum (home page: http://www.python.org

Re: [Python-Dev] anonymous blocks

2005-04-19 Thread Guido van Rossum
: myLock.release() -- --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] anonymous blocks

2005-04-19 Thread Guido van Rossum
acquirer and the substitution of @EXPR: CODE would become something like def __block(): CODE EXPR(__block) I'm not yet sure whether to love or hate it. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing

Re: [Python-Dev] anonymous blocks

2005-04-19 Thread Guido van Rossum
: not executed at all @require: assertions go here and so on. (In essence, we're inventing the opposite of barewords in Perl here, right?) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] anonymous blocks

2005-04-20 Thread Guido van Rossum
__doReading to make it absolutely clear that doReading is a local artefact, if you care about such things. -- --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] anonymous blocks

2005-04-21 Thread Guido van Rossum
off the thread.) -- --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

Re: [Python-Dev] anonymous blocks

2005-04-21 Thread Guido van Rossum
* callable. That's unusual -- most callable arguments have a definite signature, think of map(), filter(), sort() and Button callbacks. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] anonymous blocks

2005-04-21 Thread Guido van Rossum
It strikes me that with something like this lexical declaration, we could abuse decorators as per Carl Banks's recipe[1] to get the equivalent of thunks: abuse being the operative word. -- --Guido van Rossum (home page: http://www.python.org/~guido

[Python-Dev] anonymous blocks

2005-04-21 Thread Guido van Rossum
arguments why his preferred syntax and semantics are best. --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

[Python-Dev] Re: anonymous blocks

2005-04-24 Thread Guido van Rossum
are handled locally or passed through to the containing block. Note that EXPR doesn't have to return a generator; it could be any object that implements next() and next_ex(). (We could also require next_ex() or even next() with an argument; perhaps this is better.) -- --Guido van Rossum (home page: http

Re: [Python-Dev] Re: Caching objects in memory

2005-04-25 Thread Guido van Rossum
is free to use caching. In practice, I believe ints between -5 and 100 are cached, and 1-character strings are often cached (but not always). Hope this helps! I would think this is in the docs somewhere but probably not in a place where one would ever think to look... -- --Guido van Rossum (home

Re: [Python-Dev] defmacro (was: Anonymous blocks)

2005-04-25 Thread Guido van Rossum
It seems that what you call macros is really an unlimited preprocessor. I'm even less interested in that topic than in macros, and I haven't seen anything here to change my mind. -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Re: anonymous blocks

2005-04-26 Thread Guido van Rossum
for iterators and for generators. That's all I can muster right now (I should've been in bed hours ago) but I'm feeling pretty good about this. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] atexit missing an unregister method

2005-04-26 Thread Guido van Rossum
that the resource cleanup routines ought to be written so as to be reentrant. That shouldn't be too hard (you can always maintain a global flag that means already called). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

Re: [Python-Dev] Re: anonymous blocks vs scope-collapse

2005-04-26 Thread Guido van Rossum
of this mechanism unless you make a concrete proposal. You seem to have something in mind but you're not doing a good job getting it into mine... -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Re: anonymous blocks vs scope-collapse

2005-04-26 Thread Guido van Rossum
[Paul Moore] *YUK* I spent a long time staring at this and wondering where did b come from? You'd have to come up with a very compelling use case to get me to like this. I couldn't have said it better. I said it longer though. :-) -- --Guido van Rossum (home page: http://www.python.org

Re: [Python-Dev] scope-collapse

2005-04-26 Thread Guido van Rossum
proposing putting 'collapse foo' in the module, which would mean that (a) the definition of foo is intended to be a macro, and (b) all uses of foo are intended to call that macro. But I still think this whole proposal is built on quicksand, so don't take that suggestion too seriously. -- --Guido van

Re: [Python-Dev] Re: [Pythonmac-SIG] zipfile still has 2GB boundary bug

2005-04-26 Thread Guido van Rossum
sensible, please propose gradual refactoring of the implementation, perhaps some new API methods, and so on. Don't throw away the work that went into making it work in the first place! http://www.joelonsoftware.com/articles/fog69.html -- --Guido van Rossum (home page: http://www.python.org

Re: [Python-Dev] Re: [Pythonmac-SIG] zipfile still has 2GB boundary bug

2005-04-26 Thread Guido van Rossum
it for any heavy duty tasks in its current state. So, please fix 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/python-dev Unsubscribe: http

Re: [Python-Dev] Re: anonymous blocks

2005-04-26 Thread Guido van Rossum
, they will be foible-iterators and foible-generators. Anyway, I think I'll need to start writing a PEP. I'll ask the PEP editor for a number. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
- use continue EXPR to pass a value to the generator - generator exception handling explained -- --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] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
in the PEP due to a last-minute change in how I wanted to handle return; I've fixed it as you show (also renaming 'exc' to 'var' since it doesn't always hold an exception). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
code. -- --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] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
or something). An alternative that solves this would be to give __next__() a second argument, which is a bool that should be true when the first argument is an exception that should be raised. What do people think? I'll add this to the PEP as an alternative for now. -- --Guido van Rossum (home page

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
:-). As long as I am BDFL Python is unlikely to get continuations -- my head explodes each time someone tries to explain them to me. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
(). Fredrik, what does your intuition tell you? -- --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] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
rather than the second exception. I don't think so. It's similar to this case: try: raise Foo except: raise Bar Here, Foo is also lost. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
time, if you need interfaces today, I think using metaclasses would be easier than using a block-statement (if it were even possible using the latter without passing locals() to the generator). -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Integrating PEP 310 with PEP 340

2005-04-27 Thread Guido van Rossum
example, and I'm not clear why you think this is better. It's a much more complex API with less power. What's your use case? Why should 'block' be disallowed from looping? TOOWTDI or do you have something better? -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 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] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
. :) No, this is where I feel right at home. ;-) I hadn't thought much about the C-level slots yet, but this is a reasonable proposal. Time to update the PEP; I'm pretty much settled on these semantics now... -- --Guido van Rossum (home page: http://www.python.org/~guido

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Guido van Rossum
exception that was passed in or a different one -- it's all moot anyway because the StopIteration instance is thrown away by the caller of next(). -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev

  1   2   3   4   5   6   7   8   9   10   >