Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Nick Coghlan
)) if set: self[key] = default return default Using Guido's original example: d.get(key, [], True).append(value) I don't really think this is a replacement for defaultdict, though. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Nick Coghlan
Fredrik Lundh wrote: Nick Coghlan wrote: Using Guido's original example: d.get(key, [], True).append(value) hmm. are you sure you didn't just reinvent setdefault ? I'm reasonably sure I copied it on purpose, only with a name that isn't 100% misleading as to what it does ;) I think

Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Nick Coghlan
, but requires building the list of keys). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list

Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Nick Coghlan
. whether or not default_factory has been set Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing

Re: [Python-Dev] Adventures with ASTs - Inline Lambda

2006-02-18 Thread Nick Coghlan
that this is a moot point. But perhaps I can help to winnow down the dozens of rejected lambda replacement proposals to just a few rejected lamda proposals :) Heh. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] buildbot is all green

2006-02-18 Thread Nick Coghlan
blame Tim's recent checkins for test_logging subsequently breaking on Solaris though ;) There still seems to be something a bit temperamental in that test. . . Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] defaultdict and on_missing()

2006-02-28 Thread Nick Coghlan
Greg Ewing wrote: Nick Coghlan wrote: I wouldn't mind seeing one of the early ideas from PEP 340 being resurrected some day, such that the signature for the special method was __next__(self, input) and for the builtin next(iterator, input=None) Aren't we getting an argument to next

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Nick Coghlan
the way, that should probably be explained in the PEP somewhere :) Cheers, Nick -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Nick Coghlan
changed it again. Heh :) Plus the SVN history and the mailing list archive already provide that record. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] bytes.from_hex()

2006-03-01 Thread Nick Coghlan
it so that there is a single method pair (bytes.decode to go from bytes to characters, and text.encode to go from characters to bytes). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http

Re: [Python-Dev] bytes thoughts

2006-03-02 Thread Nick Coghlan
! Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] __exit__ API?

2006-03-04 Thread Nick Coghlan
@contextmanager. The solution you propose means that __exit__ methods *can* suppress exceptions if they want to, but their default behaviour will still do the right thing. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] conditional expressions - add parens?

2006-03-07 Thread Nick Coghlan
problem is a nail to be hit with the shiny new hammer ;) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] quit() on the prompt

2006-03-07 Thread Nick Coghlan
abruptly exit. It also nicely aligns with the way that license() and help() already work at the interactive prompt. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http

Re: [Python-Dev] decorator module patch

2006-03-12 Thread Nick Coghlan
of Python functions - maybe the module should be called metafunctions or functools to reflect its application domain, rather than the coincidental fact that its first member happens to be a decorator. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] decorator module patch

2006-03-12 Thread Nick Coghlan
Nick Coghlan wrote: Georg Brandl wrote: Hi, to underlay my proposals with facts, I've written a simple decorator module containing at the moment only the decorator decorator. Sorry, I forgot the initial comment which was meant to be Thanks for moving this proposal forward :) It's currently

Re: [Python-Dev] decorator module patch

2006-03-12 Thread Nick Coghlan
). Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Strange behavior in Python 2.5a0 (trunk) --- possible error in AST?

2006-03-13 Thread Nick Coghlan
, compiling the actual subscript operation :) Bug here: http://www.python.org/sf/1448804 (assigned to myself, since I already wrote a test for it and worked out where to fix it) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Strange behavior in Python 2.5a0 (trunk) --- possible error in AST?

2006-03-13 Thread Nick Coghlan
Travis E. Oliphant wrote: Nick Coghlan wrote: And how... case Ellipsis_kind: ADDOP_O(c, LOAD_CONST, Py_Ellipsis, consts) break; Just a couple of minor details missing, like, oh, compiling the actual subscript operation :) Bug here: http://www.python.org/sf/1448804

Re: [Python-Dev] Strange behavior in Python 2.5a0 (trunk) --- possible error in AST?

2006-03-14 Thread Nick Coghlan
Nick Coghlan wrote: Unfortunately my new test case breaks test_compiler. I didn't notice because I didn't use -uall before checking it in :( If no-one else gets to it, I'll try to sort it out tonight. OK, as of rev 43025 the compiler module also understands augmented assignment to tuple

[Python-Dev] PEP 338 implemented in SVN

2006-03-15 Thread Nick Coghlan
from the latest SVN version) -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] PEP 338 implemented in SVN

2006-03-15 Thread Nick Coghlan
Nick Coghlan wrote: Following Guido's acceptance of the PEP in SVN, PEP 338 has now been checked in for 2.5. (PEP's 0, 338 and 356 have been updated to reflect this). And thanks to buildbot, the test code that was broken on Windows has been fixed, too. Cheers, Nick. -- Nick Coghlan

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Nick Coghlan
this a long while back, but I have no idea what I ended up doing with the code (I think it died along with the old hard drive in my laptop). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Expose the array interface in Python 2.5?

2006-03-17 Thread Nick Coghlan
*Python* interface. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Bug 1184112 still valid

2006-03-17 Thread Nick Coghlan
: PyRun_SimpleString. Is this bug still present in current python or the 2.4 line ? I found nothing about it. Confirmed on SVN trunk. I don't know enough about the tokenizer to determine if the proposed fix is the best solution, though. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED

Re: [Python-Dev] Bug 1184112 still valid

2006-03-17 Thread Nick Coghlan
^ SyntaxError: invalid syntax There's an easy workaround (adding the missing newline), but I think there's definitely something going wrong in the tokenizer. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

[Python-Dev] Making runpy.run_module *not* thread-safe

2006-03-17 Thread Nick Coghlan
are updated. If I don't hear any objections, I'll switch SVN (along with PEP 338 and the docs patch) to the new (non-thread-safe) semantics sometime this weekend. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-17 Thread Nick Coghlan
the clause on the end (with or without mandatory parentheses) but figured I'd throw this idea out as an option. I'm not sure whether the parallel with print and print stream, is a positive or a negative, though. . . Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Expose the array interface in Python 2.5?

2006-03-17 Thread Nick Coghlan
the whole lot, then even if the standard library used a common bulk data format in 2.6, extension modules probably wouldn't be using it until 2.7. Of course, there's a whole 'nother question of where Jython, IronPython and PyPy would fit into this. . . Regards, Nick. -- Nick Coghlan | [EMAIL

Re: [Python-Dev] All green!

2006-03-17 Thread Nick Coghlan
work on Windows. The combination of -uall and rerunning with -v when a test fails is really quite effective. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http

Re: [Python-Dev] dealing with decorators hiding metadata of decorated functions

2006-03-17 Thread Nick Coghlan
show at 0x00AE9B30 Using:function wrapped at 0x00AE9CF0 Annotated?: True function show at 0x00AE9B30 Decorates:function show at 0x00AE99F0 Using:function wrapped at 0x00AE9CF0 Annotated?: False -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane

[Python-Dev] GeneratorExit inheriting from Exception

2006-03-18 Thread Nick Coghlan
. Isn't that exactly the idiom we're trying to get rid of for SystemExit and KeyboardInterrupt? Regards, Nick. [1] http://mail.python.org/pipermail/python-dev/2005-August/055173.html -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-18 Thread Nick Coghlan
iterator has completed, not that the entire stack of iterators should be shut down. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-18 Thread Nick Coghlan
, and TerminatingException if it isn't. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-18 Thread Nick Coghlan
isn't worth it. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-20 Thread Nick Coghlan
*not* apply to StopIteration - that should stay under Exception because it should never accidentally leak beyond the code that is calling the next() method. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Python 3000 Process

2006-03-20 Thread Nick Coghlan
details of what's happening on the p3yk branch. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev

Re: [Python-Dev] Long-time shy failure in test_socket_ssl

2006-03-20 Thread Nick Coghlan
. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] [Fwd: buildbot warnings in amd64 gentoo trunk]

2006-03-23 Thread Nick Coghlan
. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] [Python-3000] Iterators for dict keys, values, and items == annoying :)

2006-03-24 Thread Nick Coghlan
that philosophy be extended to slicing operations, though? Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev

Re: [Python-Dev] Expose the array interface in Python 2.5?

2006-03-24 Thread Nick Coghlan
as a multi-dimensional array. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-25 Thread Nick Coghlan
Guido van Rossum wrote: On 3/25/06, Nick Coghlan [EMAIL PROTECTED] wrote: The kind of code I'm talking about would be an *existing* Python 2.4 generator that happens to do something like: def gen(tasks): yield the results of a bunch of task functions for task in tasks

Re: [Python-Dev] Libref sections to put new modules under?

2006-03-28 Thread Nick Coghlan
to functools.partial, and add a functools.decorator function. The idea of the latter being that sticking @decorator on the front would be enough to make a decorator function well-behaved (and future-proof). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] [Python-3000] Iterators for dict keys, values, and items == annoying :)

2006-03-29 Thread Nick Coghlan
Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] [Python-3000] Iterators for dict keys, values, and items == annoying :)

2006-03-29 Thread Nick Coghlan
Nick Coghlan wrote: a message to the wrong list Darn, I'd hoped I'd caught that in time :( Sorry folks. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http

Re: [Python-Dev] What about PEP 299?

2006-03-29 Thread Nick Coghlan
main function from within the current program) seems like a recipe for disaster - far better to use the subprocess module instead (since, strangely enough, application initialisation code has this tendency to assume it has sole control of the interpreter). Cheers, Nick. -- Nick Coghlan

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Nick Coghlan
memory leaks in real applications. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list

Re: [Python-Dev] New-style icons, .desktop file

2006-03-31 Thread Nick Coghlan
, anyway ;) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Class decorators

2006-03-31 Thread Nick Coghlan
(): ... print Hi world from %s! % f ... Py f() Hi world from function f at 0x00AE90B0! -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] Class decorators

2006-03-31 Thread Nick Coghlan
Jim Jewett wrote: Nick Coghlan wrote: [ much good, including the @instance decorator ] P.S. If all you want is somewhere to store mutable state between invocations, you can always use the function's own attribute space def f(): print Hi world from %s! % f f() Hi

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-03-31 Thread Nick Coghlan
Greg Ewing wrote: Nick Coghlan wrote: Generators are even more special, in that they only require finalisation in the first place if they're stopped on a yield statement inside a try-finally block. I find it rather worrying that there could be a few rare cases in which my generators

Re: [Python-Dev] SF:1463370 add .format() method to str and unicode

2006-04-03 Thread Nick Coghlan
with an enhanced version of PEP 292 style string formatting rather than the existing mod-style formatting. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] [Python-checkins] r43545 - in python/trunk: Doc/lib/libcalendar.tex Lib/calendar.py

2006-04-03 Thread Nick Coghlan
. But now all *clients* of the Calendar class are forced to deal with the fact that firstweekday may not be greater than seven. If you want to accept any input value, why not use a property to force it to be modulo 7, rather than doing an actual range check? Cheers, Nick. -- Nick Coghlan

Re: [Python-Dev] reference leaks, __del__, and annotations

2006-04-05 Thread Nick Coghlan
that eliminate the current cycle problem? Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev

Re: [Python-Dev] Possible issue with 2.5a1 Win32 binary

2006-04-06 Thread Nick Coghlan
help. Status was 1. With -x bad.* it's zero, so it looks like that's the issue. FWIW, this breaks for me too and the output of: C:\Python25\python.exe -Wi -m compileall -f C:\Python25\Lib includes the expected SyntaxErrors from the bad_coding and badsyntax test modules. Cheers, Nick. -- Nick

Re: [Python-Dev] elementtree in stdlib

2006-04-07 Thread Nick Coghlan
the parser, the AST definition, the AST compiler and the bytecode compiler in order to get the info to the eval loop. Given that import statements aren't supposed to be in time critical code, go for the easy option :) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Proposal: expose PEP 302 facilities via 'imp' and 'pkgutil'

2006-04-12 Thread Nick Coghlan
Phillip J. Eby wrote: At 07:43 AM 4/12/2006 +1000, Nick Coghlan wrote: Phillip J. Eby wrote: I propose to create a new API, 'imp.find_loader()' and have it return a PEP 302-compatible loader object, even for cases that would normally be handled via 'imp.load_module()'. In such cases

Re: [Python-Dev] Proposal: expose PEP 302 facilities via 'imp' and 'pkgutil'

2006-04-12 Thread Nick Coghlan
Phillip J. Eby wrote: At 08:39 PM 4/12/2006 +1000, Nick Coghlan wrote: In this particular case, it would be a Python module imp.py that included the line from _imp import * (where _imp is the current C-only module with a different name). I don't think that's going to work, since importing

Re: [Python-Dev] Request for review

2006-04-13 Thread Nick Coghlan
exception name, naturally). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list

Re: [Python-Dev] Exceptions doctest Re: Request for review

2006-04-13 Thread Nick Coghlan
I wanted that was rather esoteric and easy enough to deal with by using a custom result checker. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] PEP 302 support for pydoc, runpy, etc.

2006-04-14 Thread Nick Coghlan
believe it will, but I'm not sure). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list

Re: [Python-Dev] New-style icons, .desktop file

2006-04-14 Thread Nick Coghlan
without an appropriate icon for pythonw (the Windows .exe to start Python GUI applications without displaying a console window). The plain Plus-Python icon would work in both cases (the normal python executable and the pythonw variant). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-19 Thread Nick Coghlan
for recommending that context managers should be contexts is similar to the reason that iterators should be iterables - so that doing the __context__() call manually will still give you something that can be used in a with statement. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-19 Thread Nick Coghlan
Nick Coghlan wrote: The second occurrence of context manager is meant to say context: This PEP proposes that the protocol used by the with statement be known as the context management protocol, and that objects that implement that protocol be known as context managers

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-19 Thread Nick Coghlan
A.M. Kuchling wrote: On Wed, Apr 19, 2006 at 11:10:55PM +1000, Nick Coghlan wrote: When Phillip went through to make the terminology consistent he actually swapped the meanings of context (which meant 'has a __context__ method' in the original PEP) and context manager (which meant 'has

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-20 Thread Nick Coghlan
Phillip J. Eby wrote: At 11:41 PM 4/19/2006 +1000, Nick Coghlan wrote: Given that naming though, I think contextlib.contextmanager should be renamed to contextlib.context. The name is actually correct under this terminology arrangement. @contextmanager *returns* a context manager

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-21 Thread Nick Coghlan
. Having remembered why we picked context manager over context in the first place, my preference is strongly for reverting to the original terminology. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

[Python-Dev] Removing Python 2.4 -m switch helpers from import.c

2006-04-21 Thread Nick Coghlan
With the -m switch switching to using the runpy module in 2.5, the two private helper functions exposed by import.c (_PyImport_FindModule _PyImport_IsScript) aren't needed anymore. Should I remove them, since they're essentially dead code now? Cheers, Nick. -- Nick Coghlan | [EMAIL

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-21 Thread Nick Coghlan
Greg Ewing wrote: Nick Coghlan wrote: During implementation, the meanings of context and context manager were swapped from the meanings in the approved PEP, leading to the current situation where decimal.Context is actually not, in fact, a context. That's rather disappointing. I *liked

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-21 Thread Nick Coghlan
Phillip J. Eby wrote: At 10:51 AM 4/21/2006 -0400, A.M. Kuchling wrote: On Fri, Apr 21, 2006 at 07:31:35PM +1000, Nick Coghlan wrote: fit the new definition. So we settled on calling them context managers instead. ... method. Instead, the new term manageable context (or simply context

Re: [Python-Dev] setuptools: past, present, future

2006-04-22 Thread Nick Coghlan
. The old name makes even more sense if Phillip's heuristic scan gets added :) -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-22 Thread Nick Coghlan
in the announcement. . . Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-22 Thread Nick Coghlan
of the Thread) :) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Why are contexts also managers? (was r45544 -peps/trunk/pep-0343.txt)

2006-04-22 Thread Nick Coghlan
/k5spk ? That's beautiful. It even matches the PEP [1] :) Cheers, Nick. [1] http://tinyurl.com/pc5uq -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-22 Thread Nick Coghlan
Paul Moore wrote: On 4/22/06, Nick Coghlan [EMAIL PROTECTED] wrote: Alternatively, I could have a go at clearing it up for next week's alpha2, and we can ask Anthony to make an explicit request for review of those docs in the announcement. . . I've just had a *very* quick scan through

Re: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

2006-04-22 Thread Nick Coghlan
Paul Moore wrote: Presumably, then, my proposal didn't make things clear to you? As Phillip said, I'm probably way too close to this to be a good judge of how understandable the terminology is. I just want to make one more attempt before admitting defeat. . . Cheers, Nick. -- Nick Coghlan

Re: [Python-Dev] magic in setuptools (Was: setuptools in the stdlib)

2006-04-22 Thread Nick Coghlan
the equivalent of alien (rpm - dpkg converter), so that given an egg, one can easily get a native installer for that egg. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http

Re: [Python-Dev] With context, please

2006-04-22 Thread Nick Coghlan
' is potentially confusing, and I didn't clearly acknowledge the distinction myself until the recent discussion. Not acknowledging that distinction appears to have been largely responsible for my manifest failure to document this properly in the PEP. . . Cheers, Nick. -- Nick Coghlan | [EMAIL

Re: [Python-Dev] magic in setuptools (Was: setuptools in the stdlib)

2006-04-22 Thread Nick Coghlan
Anthony Baxter wrote: On Sunday 23 April 2006 11:43, Nick Coghlan wrote: Maybe we need something that's the equivalent of alien (rpm - dpkg converter), so that given an egg, one can easily get a native installer for that egg. An 'eggconvert' that used the existing bdist_foo machinery

[Python-Dev] PEP 343 update (with statement context terminology)

2006-04-22 Thread Nick Coghlan
in the release announcement asking folks to go over the relevant documentation so we have some feedback to work with on whether the updated documentation makes sense or not. Regards, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] With context, please

2006-04-23 Thread Nick Coghlan
terminology post-alpha 2. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-23 Thread Nick Coghlan
Paul Moore wrote: On 4/23/06, Nick Coghlan [EMAIL PROTECTED] wrote: For those not following along at home, I've now updated PEP 343 to clarify my originally intended meanings for various terms, and to record the fact that we don't currently have a consensus on python-dev that those

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-23 Thread Nick Coghlan
Nick Coghlan wrote: For those not following along at home, I've now updated PEP 343 to clarify my originally intended meanings for various terms, and to record the fact that we don't currently have a consensus on python-dev that those are the right definitions. As written up in the PEP

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-23 Thread Nick Coghlan
to be something other than context object in order to reduce the current ambiguity. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] Why are contexts also managers? (wasr45544 -peps/trunk/pep-0343.txt)

2006-04-23 Thread Nick Coghlan
): The actual changes made to the runtime state by the context manager based on the current state of the context specifier This removes the ambiguity between context object and runtime context. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

[Python-Dev] Proposed addition to threading module - released

2006-04-23 Thread Nick Coghlan
between them, but other cases put the asynchronous operation inside a loop or a conditional statement which means that particular trick won't work). Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: [Python-Dev] Builtin exit, good in interpreter, bad in code.

2006-04-24 Thread Nick Coghlan
, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] Proposed addition to threading module - released

2006-04-24 Thread Nick Coghlan
Martin v. Löwis wrote: Nick Coghlan wrote: Do we want to add a released context manager to the threading module for 2.5? I don't think that should be added. I would consider it a dangerous programming style: if the lock merely doesn't need to be held (i.e. if it isn't necessary

[Python-Dev] Buildbot messages and the build svn revision number

2006-04-24 Thread Nick Coghlan
actually know whether the buildbot is reporting a real problem or not. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-24 Thread Nick Coghlan
was context managers rather than context specifiers). The changes I made this weekend are designed to give everything its own name, leaving context free to refer to either the runtime context or a context specifier or whatever else makes sense in context. Cheers, Nick. -- Nick Coghlan

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-24 Thread Nick Coghlan
-- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-24 Thread Nick Coghlan
necessary, but then neither was it necessary to make the iterator protocol a superset of the iterable protocol. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] Must objects with __enter__/__exit__ also supply __context__?

2006-04-24 Thread Nick Coghlan
- that was a deliberate design decision taken at the time iterators were introduced. I merely copied that pre-existing approach for PEP 343. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-24 Thread Nick Coghlan
Phillip J. Eby wrote: At 12:24 PM 4/24/2006 -0700, Aahz wrote: On Mon, Apr 24, 2006, Phillip J. Eby wrote: At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote: Using two names to describe three different things isn't intuitive for anybody. Um, what three things? I only count two: 1. Objects

[Python-Dev] Updated context management documentation

2006-04-25 Thread Nick Coghlan
() method. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] PEP 343 update (with statement context terminology)

2006-04-25 Thread Nick Coghlan
, the fact that it's in contextlib provides ample indication that it's talking about with statement contexts. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] Updated context management documentation

2006-04-26 Thread Nick Coghlan
Phillip J. Eby wrote: At 12:08 AM 4/26/2006 +1000, Nick Coghlan wrote: Secondly, the documentation now shows an example of a class with a close() method using contextlib.closing directly as its own __context__() method. Sadly, that would only work if closing() were a function. Classes

Re: [Python-Dev] Must objects with __enter__/__exit__ also supply __context__?

2006-04-26 Thread Nick Coghlan
Unsubscribe: http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org

Re: [Python-Dev] Reviewed patches [was: SoC proposal: fix some old, old bugs in sourceforge]

2006-04-26 Thread Nick Coghlan
in for different areas. I know I'm pretty reluctant to commit anything not directly related to the AST compiler, PEP 338 or PEP 343. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http

Re: [Python-Dev] what do you like about other trackers and what do you hate about SF?

2006-04-26 Thread Nick Coghlan
. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

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