Re: [Python-Dev] cross-compile patches

2006-12-05 Thread Martin v. Löwis
Han-Wen Nienhuys schrieb: > In response to Martin v Loewis' initial reply we have sent in > contributor agreements, but nothing else has happened so far. > > I was wondering whether there is any way for me to speed up the review > process. It may not be what you expec

Re: [Python-Dev] LSB: Binary compatibility

2006-12-05 Thread Martin v. Löwis
ABI. That may or may not be a large > technical challenge, but I think it would be a significant philosophical > change. The philosophical change would be that a specific version of that would be standardized. The "current" version could still evolve in a less documented way. >

[Python-Dev] Threading, atexit, and logging

2006-12-05 Thread Martin v. Löwis
plicitly to register its sys.exitfunc), but it might break if other applications still insist on installing a sys.exitfunc. What do you think about this approach? Regards, Martin P.S. There is another issue reported about the interpreter crashing; I haven't been ab

Re: [Python-Dev] LSB: Selection of a Python version

2006-12-05 Thread Martin v. Löwis
from untrusted users in their programs are on their own, anyway - since we removed the rexec module). Regards, Martin ___ 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] Threading, atexit, and logging

2006-12-06 Thread Martin v. Löwis
ding` stuff an > exit function into a module global, and change Py_Finalize() to look > for that and run it (if present) before invoking call_sys_exitfunc(). Ok, that's what I'll do then. Yet another alternative would be to have the "daemonic" thread feature in the thre

Re: [Python-Dev] LSB: Binary compatibility

2006-12-06 Thread Martin v. Löwis
for those vendors, *only* security patches matter. They can justify carrying outdated software around for compatibility only, but they cannot justify including it if it has known security bugs. Regards, Martin ___ Python-Dev mailing list Python-D

Re: [Python-Dev] Threading, atexit, and logging

2006-12-06 Thread Martin v. Löwis
at's also "user-screwable", as a user may put something else into threading._shutdown. To make it non-visible, it has to be in C, not Python (and even then it might be still visible to extension modules). Regards, Martin ___ Pyt

Re: [Python-Dev] [NPERS] Re: a feature i'd like to see in python #2: indexing of match objects

2006-12-07 Thread Martin v. Löwis
Alastair Houghton schrieb: > How about we remove the word "foolish" from the debate? We should table the debate. If you really want that feature, write a PEP. You want it, some people are opposed; a PEP is the procedure to settle the difference. Re

[Python-Dev] Adding C99 bool to struct module

2006-12-07 Thread Martin v. Löwis
#1610575 suggests to introduce the 't' code to support the _Bool type where available, and uses char if it isn't available. Any objections to adding it? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyt

Re: [Python-Dev] [Python-checkins] MSI being downloaded 10x more than all other files?!

2006-12-08 Thread Martin v. Löwis
time, people will have local copies of the 2.5 MSI file, and don't redownload if they install on a new machine. Regards, Martin ___ 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] [Python-checkins] MSI being downloaded 10x more than all otherfiles?!

2006-12-08 Thread Martin v. Löwis
Terry Reedy schrieb: > How do the first two months downloads of 2.5.msi compare to 2.4.msi? It's actually publicly available: http://www.python.org/webstats/ Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.py

Re: [Python-Dev] MSI being downloaded 10x more than all other files?!

2006-12-08 Thread Martin v. Löwis
tics weren't updated correctly until recently. Regards, Martin ___ 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] MSI being downloaded 10x more than all other files?!

2006-12-08 Thread Martin v. Löwis
Martin v. Löwis schrieb: >> Have the ratios changed against past figures (too lazy to look them up now)? > > They did, but also because the statistics weren't updated correctly > until recently. Qualifying a bit further: the last month that apparently had nearly corre

Re: [Python-Dev] Windows SDK

2006-12-09 Thread Martin v. Löwis
with. Mixing CRTs may or may not work, depending on what precisely the extension module does. For 2.6, I hope we will switch to VS 2007 (assuming that's released at that point). Then, the question is whether the Windows SDK will support VS 2007. Regards, Martin

Re: [Python-Dev] fileinput module tests

2006-12-09 Thread Martin v. Löwis
w whether a change is just a structural one, or a substantial one. Regards, Martin ___ 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] Adding resume (206) support to urllib(2)

2006-12-12 Thread Martin v. Löwis
lly specific to http, and adding it to urllib would break the abstraction. In any case, there is no "pipeline" it may be in (except for changes that have already been committed to the trunk). Something may have been submitted as a patch or feature request, b

Re: [Python-Dev] Adding resume (206) support to urllib(2)

2006-12-12 Thread Martin v. Löwis
ntribute in the first place (given that it "works" already either way), but it might have been a convenience API for the range header, and a parser for the content-range header. That should go IMO into httplib, so that all users of httplib get access to it, not just urllib*. Regards, Marti

Re: [Python-Dev] Adding resume (206) support to urllib(2)

2006-12-13 Thread Martin v. Löwis
they ought to be implemented in httplib as well. If everybody wants to become urllib just a better library to access http servers, I probably can't do much about it, though. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] Adding resume (206) support to urllib(2)

2006-12-13 Thread Martin v. Löwis
est, implicit headers features, something is wrong with the abstractions. Regards, Martin ___ 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] About dictionary lookup caching

2006-12-19 Thread Martin v. Löwis
eed an extended arg, but don't have space for it. Regards, Martin ___ 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] About dictionary lookup caching

2006-12-19 Thread Martin v. Löwis
by everyone hoping to generate or hack bytecodes. It wouldn't be a strict invariant, but instead, breaking it would mean that the memory consumption goes up somewhat. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/

Re: [Python-Dev] classes and cell variables question

2006-12-19 Thread Martin v. Löwis
se classes) would need to be accessed through qualification. It would also be counter-intuitive if you find methods in an unqualified manner, but then can't call them because you didn't give a self argument. If you don't follow this reasoning, please write a counter-proposal s

Re: [Python-Dev] [Python-checkins] r53110 - python/trunk/Lib/mailbox.py

2006-12-21 Thread Martin v. Löwis
ple think they *have* to use them, and that doing so gives better code... Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/p

Re: [Python-Dev] [Python-checkins] r53110 - python/trunk/Lib/mailbox.py

2006-12-29 Thread Martin v. Löwis
in what Python version)? I'd have to consult the documentation for either; help(file.seek) gives the numeric values. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail

Re: [Python-Dev] multiple interpreters and extension modules

2006-12-29 Thread Martin v. Löwis
rpreters, this aspect should be taken into account. Whether there is any chance to add the PEP to 2.x, I don't know - it needs to be written first. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/

Re: [Python-Dev] multiple interpreters and extension modules

2006-12-29 Thread Martin v. Löwis
ing I wanted someone > else to do the work. I was actually going to, for several years now. Please do write the PEP before making the implementation. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] Possible platforms to drop in 2.6

2006-12-29 Thread Martin v. Löwis
hould use the PEP 11 procedure: let configure fail (early) on the system, and then remove support if nobody complains (in 2.7 and 3k). Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Un

Re: [Python-Dev] Possible platforms to drop in 2.6

2006-12-30 Thread Martin v. Löwis
e that any maintainer would watch python-dev in some > fashion. Is there an official list of maintainers? Not that I know of. The AtheOS port was contributed through patch #488073, by Octavian Cerna (tavyc). It seems that the primary contributor for the BeOS port was Chris Herborth (

Re: [Python-Dev] Non-blocking (asynchronous) timer without thread?

2006-12-30 Thread Martin v. Löwis
Evgeniy Khramtsov schrieb: > Is there any plans to implement non-blocking timer like a > threading.Timer() but without thread? On Unix, you can use signal.alarm. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

[Python-Dev] Renaming Include/object.h

2007-01-03 Thread Martin v. Löwis
. What do you think? Regards, Martin ___ 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] Renaming Include/object.h

2007-01-03 Thread Martin v. Löwis
include "py/object.h" Any preferences? Regards, Martin ___ 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] Renaming Include/object.h

2007-01-03 Thread Martin v. Löwis
Thomas Wouters schrieb: > (Only for header > files that should really be internal, of course, not ones that are > oft-used outside the core.) Which are these? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.p

Re: [Python-Dev] Renaming Include/object.h

2007-01-03 Thread Martin v. Löwis
header file, and does Python have any? I can see why Modules/sre.h is "private": it won't get installed at all, so users can't include them. For everything in Include, I think users can, and will, include them directly, unless they g

Re: [Python-Dev] Private header files (Was: Renaming Include/object.h)

2007-01-03 Thread Martin v. Löwis
t): code.h, parsetok.h, > pyarena.h, longintrepr.h, osdefs.h, pgen.h, node.h Thomas said that at least code.h must stay where it is. What is the reason that you want them to be renamed? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Private header files (Was: Renaming Include/object.h)

2007-01-04 Thread Martin v. Löwis
ollision as what started this > thread. It also provides a simple way of demonstrating what's public > and what is not. It addresses all my complaints. There are only a > few rules and they are simple. As specified, above, it is incompatible with the current API. I think #includ

Re: [Python-Dev] Private header files (Was: Renaming Include/object.h)

2007-01-04 Thread Martin v. Löwis
there is the issue that the framework includes in OSX magically look for python.framework when searching for python/foo.h, which they find, so that may get us the wrong version. Somebody would have to study the details here, first. Regards, Martin ___

Re: [Python-Dev] Renaming Include/object.h

2007-01-05 Thread Martin v. Löwis
.. I however wondered if there were good reasons for > module objects for not being published. I guess it's included in the C file because that's the easiest way to implement it. AFAICT, it has been that way from the beginning. Regards, Martin ___

Re: [Python-Dev] Bug or not? Different behaviour iterating list and collections.deque

2007-01-07 Thread Martin v. Löwis
el you are referring to a different issue, unfortunately, I cannot tell from your post what that issue is. Regards, Martin ___ 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] [Python-3000] Warning for 2.6 and greater

2007-01-12 Thread Martin v. Löwis
.x version that *introduces* the new way, as it is not merely a new API, but a changed API. Regards, Martin ___ 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] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread Martin v. Löwis
ward that doesn't involve something painful, > so long as 3.0 is going to be the clean break. There would be if there was some version which already had .items as an iterator, but still supported .iteritems as well. Let's call that version 2.99. It would be compatib

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread Martin v. Löwis
scope to identify the return value of items() in that particular > context. Why do you think that this would be that certainly possible? I cannot imagine an efficient implementation. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org h

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-13 Thread Martin v. Löwis
d to just continue maintaining 2.x forever. I have > yet to see a reason why, other than continued maintenance, 3.0 would be > a preferable development platform. Eventually, continued maintenance *will* be a concern to your users. Maybe not at 3.0, but perhaps

Re: [Python-Dev] C standard io library, flush/read/write problem

2007-01-13 Thread Martin v. Löwis
Emerson Clarke schrieb: > Add this to the Read() method before reading takes place: If you don't submit it as a patch to sf.net/projects/python, it is likely to get ignored. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.

Re: [Python-Dev] IOError errno=514 in time.sleep(1)

2007-01-13 Thread Martin v. Löwis
pecific action to take will become clearer. Regards, Martin ___ 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] [Python-3000] Warning for 2.6 and greater

2007-01-15 Thread Martin v. Löwis
to as much as > we can, in Python 2.6 and 2.7, to ease it (and the other transitions.) > That means the 2to3 tool and warnings in appropriate places, and > anything else we can do. I don't think we should do *everything* we can. If 2.6 performance will suffer significantly t

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-15 Thread Martin v. Löwis
on that I can imagine an inefficient implementation. I cannot imagine any reasonable behaviour of a per-module change of methods on dictionary objects. > Do I just suffer from having an overactive imagination? Are all of > these implementation strategies impossible

Re: [Python-Dev] [Python-3000] Warning for 2.6 and greater

2007-01-16 Thread Martin v. Löwis
ompatibility with 3.x, it will return a method that produces an iterator. Of course, one might say "don't do that, then". Regards, Martin ___ 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] adding _Py prefix to names in 2.5.1?

2007-01-18 Thread Martin v. Löwis
ans that any module > built with 2.5 that is using these names will fail to work in 2.5.1. > No code outside the core *should* be using these names. I'll look into this. I will create macros in the header file for them, so that existing source code will continue to co

Re: [Python-Dev] Deletion order when leaving a scope?

2007-01-18 Thread Martin v. Löwis
Deleting b Here, it creates b first, then a (it's the else case), yet deletes them in reverse order. As others have pointed out, the deletion order is the one indicated by the locals array: py> f.func_code.co_varnames ('x', 'a', 'b') Regards, Ma

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-18 Thread Martin v. Löwis
le from sys.modules when somebody still has a reference to the search function. Don't do that, then. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pyth

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-18 Thread Martin v. Löwis
port encodings py> encodings.search_function.__module__ 'encodings' It's a string, rather than the module object, precisely to avoid cyclic references. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] Problem between deallocation of modules and func_globals

2007-01-19 Thread Martin v. Löwis
y cycle with an object implementing __del__ will keep loads of modules alive, noncollectable for GC. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

[Python-Dev] Eliminating f_tstate

2007-01-21 Thread Martin v. Löwis
probably has to remain where it is, and only PyTraceBack_Here should stop using it. As a consequence, a generator .send() makes exceptions occur in the current thread, not in the thread where the generator was created. What do you think? Regards, Martin ___

Re: [Python-Dev] [Python-checkins] buildbot failure in amd64 gentoo 2.5

2007-01-22 Thread Martin v. Löwis
Georg Brandl schrieb: > Do I miss something here, or is the buildbot hit by spammers now? It looks like it is. If that continues, we have to disable the web triggers. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org h

Re: [Python-Dev] Object creation hook

2007-01-23 Thread Martin v. Löwis
t this isn't a python-dev question, but more appropriate for comp.lang.python (as it is of the "how do I x with Python?" kind). I would use a debug build, and use sys.getobjects to determine all objects and find leaks. Regards, Martin ___ Pytho

Re: [Python-Dev] Problem with signals in a single threaded application

2007-01-23 Thread Martin v. Löwis
plan for signals support in python, so > what can be done? I agree it's a bug, and I agree with your proposed analysis. Please try to come up with a patch (e.g. by putting a while(is_tripped) loop around the for loop). Also make sure you include test case

Re: [Python-Dev] Problem with signals in a single threaded application

2007-01-24 Thread Martin v. Löwis
r me to review, so I'm unable to comment whether it fixes the problem under discussion. I feel that this problem should find a much simpler solution. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/

Re: [Python-Dev] Having trouble committing

2007-01-25 Thread Martin v. Löwis
this time (22:27 +0100) Can you try again? Regards, Martin ___ 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] Python's C interface for types

2007-01-26 Thread Martin v. Löwis
y 5.0" equals 5 or not: if it does, it should hash the same as 5, if it doesn't, it may or may not hash the same (whatever is easier to implement). For 0: hash(+0.0)==hash(-0.0)==hash(0)=hash(0L)=0 Regards, Martin ___ Python-Dev mailing lis

Re: [Python-Dev] Problem with signals in a single threaded application

2007-01-27 Thread Martin v. Löwis
atomically? If it is only cleared if it is set, I see no need to make the test and the clearing atomic. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pytho

Re: [Python-Dev] Object creation hook

2007-01-27 Thread Martin v. Löwis
_CallFunctionObjArgs(PyCCP_CreationHook, obj, 0); > Py_XDECREF(result); if (!result) PyErr_Clear(); PyCCP_CreationHook = > tmp; } } I think this is not thread-safe. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.py

Re: [Python-Dev] Python's C interface for types

2007-01-27 Thread Martin v. Löwis
any API. For the documented API, there is certainly a stronger desire to provide backwards compatibility in the face of changes, but in some cases, it just means that the change also gets documented. Regards, Martin ___ Python-Dev mailing list Python-Dev@py

Re: [Python-Dev] Problem with signals in a single threaded application

2007-01-28 Thread Martin v. Löwis
However, in this specific case, I think the chance that that the signal gets delayed is high, and the case can be easily implemented to avoid that risk. Regards, Martin ___ 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] Python's C interface for types

2007-02-01 Thread Martin v. Löwis
anything should be changed. If introducing extended floating-points would cause trouble to existing operations, I think extended floating-points should not be introduced to Python. If all three of you really need them, come up with method names to e

Re: [Python-Dev] Python's C interface for types

2007-02-01 Thread Martin v. Löwis
t formats like Decimal take off. > Note that it is not a fault in Decimal, but a feature of almost all > extended floating-points. As I said, I have no answer to it. It doesn't look like you *need* to give an answer now. I thought you were proposing

Re: [Python-Dev] Changing a value in a frame (for a debugger)

2007-02-07 Thread Martin v. Löwis
n in the process of developing a patch, too. Regards, Martin ___ 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] Why is nb_inplace_power ternary?

2007-02-08 Thread Martin v. Löwis
ather than invoking __ipow__ with a third argument if its not None). Comments? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/pytho

Re: [Python-Dev] Why is nb_inplace_power ternary?

2007-02-08 Thread Martin v. Löwis
his has undefined behavior. Even if it had, slot_nb_inplace_power would silently discard its third argument. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] Why is nb_inplace_power ternary?

2007-02-09 Thread Martin v. Löwis
with three arguments if __ipow__ is defined, else it invokes __pow__ with three arguments) The only case I could find where a third argument is non-None is when the builtin pow() is invoked, which then invokes nb_power (but not nb_inplace_power) with three arguments. Rega

Re: [Python-Dev] Why is nb_inplace_power ternary?

2007-02-09 Thread Martin v. Löwis
exception is unacceptable, I'd rather explicitly ignore the extra argument, instead of ignoring it implicitly. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.py

Re: [Python-Dev] Why is nb_inplace_power ternary?

2007-02-09 Thread Martin v. Löwis
= 10 or x * n *= 10 Also, it would break existing __ipow__ implementations that only receive two arguments (unless there would be another __ method introduced). Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.or

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-09 Thread Martin v. Löwis
r successful creation > of the socket. > > Does anybody else think this is a good idea? (Personally I think this > should've been done years ago. :-) Shall I check it into the head? Please also consider #723312, which is more general, but also mo

Re: [Python-Dev] Why is nb_inplace_power ternary?

2007-02-10 Thread Martin v. Löwis
Greg Ewing schrieb: >> What could the syntax for that be? > > It wouldn't be a syntax, just a function, e.g. > >ipow(x, n, 10) In what way would that be inplace? A function cannot rebind the variables it gets as param

Re: [Python-Dev] Why is nb_inplace_power ternary?

2007-02-10 Thread Martin v. Löwis
nb_inplace_power with the tuple (and __ipow__ if x's class is written in Python). Whether this gives a TypeError or not depends on the class of x. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/li

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread Martin v. Löwis
. You are currently assigned bug #723312 (and have been since 2003-04-17), which has a patch to change ftplib. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread Martin v. Löwis
ssigned to you, please consider unassigning them if you don't plan to work on them. Regards, Martin ___ 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] Trial balloon: microthreads library in stdlib

2007-02-11 Thread Martin v. Löwis
. Of course, he didn't propose it because he assumed that proposal would be turned down, anyway. Regards, Martin ___ 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] Trial balloon: microthreads library in stdlib

2007-02-11 Thread Martin v. Löwis
ism would you like to use, and on what systems? Regards, Martin ___ 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] Does Python/Python-ast.c need to be checked in?

2007-02-11 Thread Martin v. Löwis
ans you have to make two commits per AST grammar change: one to change the grammar, and the other to update the regenerated file. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscr

Re: [Python-Dev] Trial balloon: microthreads library in stdlib

2007-02-11 Thread Martin v. Löwis
d as-is, for a number of reasons I listed; I didn't mean to imply that it can never be integrated. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.

Re: [Python-Dev] Does Python/Python-ast.c need to be checked in?

2007-02-11 Thread Martin v. Löwis
Guido van Rossum schrieb: > Is this documented somewhere? It wouldn't hurt if there was a pointer > to that documentation right next to the line in Python-ast.c that gets > modified by the regeneration. (I've been wondering about this a few > times m

Re: [Python-Dev] Does Python/Python-ast.c need to be checked in?

2007-02-11 Thread Martin v. Löwis
completely show up in "svn diff" (when only the number changes). I don't think that's a problem. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: htt

Re: [Python-Dev] Does Python/Python-ast.c need to be checked in?

2007-02-11 Thread Martin v. Löwis
time stamps, but because the subsequent compile run will regenerate the file and modify it in the process. Then, all other developers will find modifications in their tree that they didn't make. Regards, Martin ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Does Python/Python-ast.c need to be checked in?

2007-02-12 Thread Martin v. Löwis
Martin v. Löwis schrieb: > Guido van Rossum schrieb: >> Is this documented somewhere? It wouldn't hurt if there was a pointer >> to that documentation right next to the line in Python-ast.c that gets >> modified by the regeneration. (I've been wondering about this a

Re: [Python-Dev] Trial balloon: microthreads library in stdlib

2007-02-12 Thread Martin v. Löwis
ot;. I *personally* object to changes where it is easy to crash the interpreter, unless there is a clear specification when this may happen, and there is a systematic way to avoid that (this is the ctypes clause). Regards, Martin ___ 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] New syntax for 'dynamic' attribute access

2007-02-12 Thread Martin v. Löwis
Guido van Rossum schrieb: > PS Thanks to Ben for excellent summaries of the discussion so far! I'd like to second this. This is how PEPs ought to work. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] Trial balloon: microthreads library in stdlib

2007-02-12 Thread Martin v. Löwis
t will just fail. Look at Tcl's even mechanism for an example that has failed (IMO). Regards, Martin ___ 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] Interning string subtype instances

2007-02-12 Thread Martin v. Löwis
store the reference in some global/static variable. builtin_intern will return it to the caller, which then needs to store it. This was always the case with intern(); the usage pattern is foo = intern(foo) as intern may return a different object (e.g. if the string was

Re: [Python-Dev] Interning string subtype instances

2007-02-12 Thread Martin v. Löwis
Hrvoje Nikšić schrieb: > The patch could look like this. If there is interest in this, I can > produce a complete patch. I can't see a problem with that (although I do wonder why people create string subtypes in the first place). Rega

Re: [Python-Dev] Trial balloon: microthreads library in stdlib

2007-02-12 Thread Martin v. Löwis
s on what the end result would be. Regards, Martin ___ 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] New syntax for 'dynamic' attribute access

2007-02-12 Thread Martin v. Löwis
r] > raise AttributeError, attr And again. Apparently, people favor hasattr over catching AttributeError. I'm not sure why this is - I would probably rewrite them all to deal with AttributeError if I use the new syntax in the first place. Regards, Martin __

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-12 Thread Martin v. Löwis
7;s easier to parse the second one visually. Ah, precedence. It definitly should be a bracketed form, or else people always wonder what the precedence is, and add parenthesis anyway just to be on the safe side. BTW, which of these would be correct (a).[b] (a.)[b] a.[(b

Re: [Python-Dev] Recent experience with the _ast module

2007-02-12 Thread Martin v. Löwis
o of > the "else" suite and then search between those two for the "else" > statement. Notice that you cannot restore the original source code, anyway. You cannot tell whether something was else:if or elif. I don't understand why you need the line numb

Re: [Python-Dev] Interning string subtype instances

2007-02-13 Thread Martin v. Löwis
element and attribute names into (but not element content, which typically isn't likely to be repeated). It starts with a fresh dictionary before parsing starts, and releases the dictionary when parsing is done. Regards, Martin ___ Python-Dev mailing li

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-13 Thread Martin v. Löwis
that .[ should be two tokens. Regards, Martin ___ 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] Trial balloon: microthreads library in stdlib

2007-02-13 Thread Martin v. Löwis
d state that it has that modified behavior. Of course, people may object to massive library changes of the nature "if running in stackless mode, this library routine behaves differently". Regards, Martin ___ Python-Dev mailing list Python-Dev@python

Re: [Python-Dev] Interning string subtype instances

2007-02-13 Thread Martin v. Löwis
is for notequal, no special casing is performed at all (except that knowing that identical strings aren't notequal). The entire algorithm and optimization works just as fine for a user-defined interning dictionary (assuming that all relevant string

Re: [Python-Dev] Any value in setting up pybots for py3k?

2007-02-13 Thread Martin v. Löwis
ocally, anyway, and then run the package in question on top of that. Regards, Martin ___ 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] Trial balloon: microthreads library in stdlib

2007-02-13 Thread Martin v. Löwis
, it became less maintainable than if it had taken the liberty to change things. Of course, then you have two versions to maintain: the in-core version that nicely integrates, and the out-of-core version, that has minimal changes. It first takes effort to cr

Re: [Python-Dev] Summary of "dynamic attribute access" discussion

2007-02-13 Thread Martin v. Löwis
turn hasattr(self, name) It's so easy people can include in their code for backwards compatibility; in Python 2.6, it could be a highly-efficient builtin (you still pay for the lookup of the name 'attrs', of course). Regards, Martin ___ Py

<    19   20   21   22   23   24   25   26   27   28   >