Re: [Python-Dev] Removing the GIL (Me, not you!)

2007-09-14 Thread Greg Ewing
ect, without introducing far more overhead than you're trying to eliminate. > Then there are thread-specific reference counters for each object. What happens when a new thread comes into existence? Do you go through all existing objects and add another element to

Re: [Python-Dev] Iterating over objects of unknown length

2007-09-26 Thread Greg Ewing
or emptiness is clearly expecting x to be a sequence, *not* an iterator, and you've violated the contract by passing it one. This is what you may be running into with the libraries you mention. Generally I think it's a bad idea to try to pr

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-26 Thread Greg Ewing
Although I suspect that a string containing "\r\n" is going to cause more problems for Python applications than this. E.g. consider what happens when you try to split a string on newlines. -- Greg Ewing, Computer Science Dept, +--+ University of

Re: [Python-Dev] urllib exception compatibility

2007-09-26 Thread Greg Ewing
convenient to be able to catch EnvironmentError and get anything that is caused by circumstances outside the program's control. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurc

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-27 Thread Greg Ewing
ary between Python code and .NET code. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm not a mo

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Greg Ewing
or codes might belong to different domains. Although I suppose you could have another attribute to distinguish them if necessary. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurc

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Greg Ewing
unds like it has something to do with the unix environment variables. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-29 Thread Greg Ewing
nes, you just have to accept that you can't also have \r characters meaning something other than newlines in your files. This is true regardless of what programming language or I/O model is being used. -- Greg ___ Python-Dev mailing list Pyt

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-29 Thread Greg Ewing
ething that ought to be done automatically by the Python/.NET interfacing machinery, maybe by having a different type for .NET strings. -- Greg ___ 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] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Greg Ewing
a huge nuisance. -- Greg ___ 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] Re: New lines, carriage returns, and Windows

2007-09-30 Thread Greg Ewing
r of the above models cause the confusion being shown by > the postings in this thread. There's no confusion about how newlines are represented *inside* a Python program. The convention is quite clear - a newline is "\n" and only "\n"

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-30 Thread Greg Ewing
an that you "don't get back what you wrote". If you write "\f\n" to a file using Python and read it back, you get "\f\n". If you write just "\f", you get back "\f". What the \f *means* is a separate issue. -- Greg Ewing, Computer Sc

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-30 Thread Greg Ewing
blem should really be addressed at the source, which is the Python/.NET boundary. Anything else would just lead to ambiguity. So I'm voting -1 on my own proposal here. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury,

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-30 Thread Greg Ewing
ould say IronPython is getting it wrong by using inconsistent internal representations of line endings. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Greg Ewing
t need any wrappers. To make that really true would require IronPython to become a different language that has a different canonical representation of newlines. It's fine with me to keep things as they are. -- Greg Ewing, Computer Science Dept, +--+

Re: [Python-Dev] GC Changes

2007-10-01 Thread Greg Ewing
rge chunks of memory like mark-and-sweep, it happens far less frequently than would happen if mark-and-sweep were used for all memory management. Also, the programmer can minimise the need for it by manually breaking cycles where they are known to occur. -- Greg Ewing, Computer Science Dept, +---

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Greg Ewing
Nick Maclaren wrote: > if Python's own > interpretation is ambiguous, it is a sure recipe for different > translators being incompatible, Python's own interpretation is not ambiguous. The problem at hand is people wanting to use some random mixture of Python and .NET conventio

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Greg Ewing
appers, especially cross-platform ones like wxPython. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm not a morning person.

Re: [Python-Dev] GC Changes

2007-10-01 Thread Greg Ewing
and only mallocs more if that fails. I think it also counts the number of allocations made since the last GC and does a GC when it gets up to some threshold, so that things get cleaned out periodically and the processing is spread out somewhat. -- Greg Ewing, Computer Scie

Re: [Python-Dev] GC Changes

2007-10-01 Thread Greg Ewing
Adam Olsen wrote: > This isn't true at all. It's triggered by heuristics based on the > total number of allocated objects. Hmmm, all right, it seems I don't know what I'm talking about. I'll shut up now before I spread any more misinformation. Sorry. -- Gr

Re: [Python-Dev] GC Changes

2007-10-02 Thread Greg Ewing
re is that the GC's lack of knowledge about how much memory is being used means that you need to care more than you should have to. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsu

Re: [Python-Dev] GC Changes

2007-10-03 Thread Greg Ewing
Martin v. Löwis wrote: > For stack frames, > such a registration is difficult to make efficient. Also very error-prone if you happen to miss one. Although maybe no more error-prone than getting the reference counting right. -- Greg ___ Pyth

[Python-Dev] MacOSX -framework options and distutils weirdness

2007-10-09 Thread Greg Ewing
.o -L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib -lm -lGLEW -lfreetype -lcal3d -lstdc++ -lode -o build/lib.darwin-8.4.0-Power_Macintosh-2.3/soya/_soya.so -framework OpenGL -framework SDL -framework OpenAL This is on MacOSX 10.4 with Python 2.3. --

Re: [Python-Dev] MacOSX -framework options and distutils weirdness

2007-10-09 Thread Greg Ewing
istutils would set it to something appropriate for the Python being used. Any suggestions on how I can find out what setting of MACOSX_DEPLOYMENT_TARGET is being used by distutils, and how to make it use something different if it's not right? -- Greg ___

Re: [Python-Dev] MacOSX -framework options and distutils weirdness

2007-10-10 Thread Greg Ewing
ARGET. I tried setting it to 10.1, 10.2, 10.3, 10.4 and leaving it unset, and in all these cases the command works when run directly from the shell. So I'm not sure what to try next. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail

Re: [Python-Dev] MacOSX -framework options and distutils weirdness

2007-10-12 Thread Greg Ewing
but if it runs gcc directly, it doesn't work. Anyone have any ideas on how that can happen? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opt

Re: [Python-Dev] MacOSX -framework options and distutils weirdness

2007-10-12 Thread Greg Ewing
Oleg Broytmann wrote: >Do you have a few different copies of gcc installed with setup.py called > the wrong one and your shell script the right one? As far as I can tell, it's using my PATH to find gcc, and that leads to /usr/bin/gcc, which is the same one my wrapper call

Re: [Python-Dev] MacOSX -framework options and distutils weirdness

2007-10-12 Thread Greg Ewing
I wrote: > As far as I can tell, it's using my PATH to find gcc, > and that leads to /usr/bin/gcc, which is the same one > my wrapper calls. To make sure, I installed my wrapper in place of /usr/bin/gcc and the same behaviour oc

Re: [Python-Dev] Explicit Tail Calls

2007-10-13 Thread Greg Ewing
In my experience, the only time recursion is really called for in Python is when you're operating on tree-shaped data structures, in which case tail calls don't really come into it. When operating on something linear, I find that a for-loop or list comprehension usually gets the job

Re: [Python-Dev] C Decimal - is there any interest?

2007-10-16 Thread Greg Ewing
Steve Holden wrote: > Using a radix notation for literals would, IMHO, be acceptable if you > can get the idea accepted This would make decimal (or at least a part of it) a required part of the Python core rather than an optional module. There might be some resistance to that. -

Re: [Python-Dev] Does Python need a file locking module (slightly higher level)?

2007-10-22 Thread Greg Ewing
ds more like something written by the GNU folks than the BSD folks. -- Greg ___ 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 need a file locking module (slightly higher level)?

2007-10-22 Thread Greg Ewing
[EMAIL PROTECTED] wrote: > Does fcntl.flock work over NFS and SMB and on Windows? I don't think file locking will ever work over NFS, since it's a stateless protocol by design, and locking would require maintaining state on the ser

Re: [Python-Dev] Python 2.5.1 ported to z/OS and EBCDIC

2007-10-22 Thread Greg Ewing
Lauri Alanko wrote: > In the end, for now, I made protocol 0 textual, That could be a mistake. I believe there are some objects, such as array.array, that use a binary format for pickling even in protocol 0. -- Greg ___ Python-Dev mailing list Pyt

Re: [Python-Dev] Declaring setters with getters

2007-10-31 Thread Greg Ewing
if they're buried inside property descriptors with no other reference to them, it's a lot harder to get hold of one. -- Greg ___ 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] Declaring setters with getters

2007-10-31 Thread Greg Ewing
Guido van Rossum wrote: > Isn't there? You can just use super() ISTR, That may work, now that I come to think about it. However, super() is not a complete solution, because it doesn't let you choose which inherited method to call in a multiple inheritance situat

Re: [Python-Dev] Declaring setters with getters

2007-11-01 Thread Greg Ewing
nstance, so that doesn't happen. -- Greg ___ 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] Declaring setters with getters

2007-11-01 Thread Greg Ewing
write that as def attribute.set(self, value): ... -- Greg ___ 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] Declaring setters with getters

2007-11-01 Thread Greg Ewing
Raymond Hettinger wrote: > Let's stick with "propset" which has precedent as an svn action and > serves as a short, simple mnemonic to the functionality. But if we're going to have "propset", it raises the question of w

Re: [Python-Dev] Should we do away with unbound methods in Py3k?

2007-11-21 Thread Greg Ewing
Phillip J. Eby wrote: > The lookup sequence should probably be something like: > >1. type(ob) is cls >2. issubclass(type(ob), cls) But can't issubclass be overridden as well? -- Greg Ewing, Computer Science Dept, +--+ Univers

Re: [Python-Dev] Should we do away with unbound methods in Py3k?

2007-11-21 Thread Greg Ewing
st not using them > in this case) Fine by me. I've always thought they were of dubious value in the first place. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zeal

Re: [Python-Dev] Should we do away with unbound methods in Py3k?

2007-11-22 Thread Greg Ewing
to be able to override it in subclasses, to me that's an indication that it should be an instance method. Also, what happens if you perform such a migration and then some subclasser later finds that he wants access to 'self'? I don't see this as a use case

Re: [Python-Dev] Should we do away with unbound methods in Py3k?

2007-11-22 Thread Greg Ewing
access to > > 'self'? > > Then he overrides it with a normal method. If that works, I don't see why making the default method a normal method wouldn't work also. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mai

Re: [Python-Dev] Backquote deprecation warning

2007-11-23 Thread Greg Ewing
#x27;s paid off enormously, as I can produce highly pinpointed error messages for just about anything at any stage of processing. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubsc

Re: [Python-Dev] Should we do away with unbound methods in Py3k?

2007-11-23 Thread Greg Ewing
self and discards it, so I still don't think staticmethod is essential in the absence of unbound methods. Not that I would object if it stayed around -- I don't really mind one way or the other. -- Greg ___ Python-Dev mailing list

Re: [Python-Dev] Should we do away with unbound methods in Py3k?

2007-11-24 Thread Greg Ewing
André Malo wrote: > * Greg Ewing wrote: > > > But you could just as well wrap > > it in a function that takes self and discards it, > > I always thought, that this is exactly what staticmethod does. Not quite -- staticmethod prevents a self from getting passed in the fi

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-28 Thread Greg Ewing
Steve Holden wrote: > The namespace should really be called __global__. I doubt this will fly, > because it's too radical, and unfortunately would undermine the "global" > keyword __uberglobal__ -- Greg ___ Python-Dev

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-28 Thread Greg Ewing
Guido van Rossum wrote: > You can do that but the special entry in globals is still required in > order to pass it on to all scopes that need it. Unless you use something other than a plain dict for module namespaces. -- Greg ___ Python-Dev m

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-29 Thread Greg Ewing
The next step up from global would be __galactic__. -- Greg ___ 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] [poll] New name for __builtins__

2007-11-29 Thread Greg Ewing
Nick Coghlan wrote: > why not call it __implicit__? But isn't __explicit__ better than __implicit__? :-) I tend to agree about __root__, though -- it just doesn't seem quite right somehow. -- Greg ___ Python-Dev mailing list Python-D

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-29 Thread Greg Ewing
Another idea: __ubiquitous__ -- Greg ___ 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] [poll] New name for __builtins__

2007-11-29 Thread Greg Ewing
> __the_dictionary_where_all_the_builtins_are_now__ __the_entry_formerly_known_as_builtins__ -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mail

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-30 Thread Greg Ewing
, specific module, whereas __main__ is a pseudo-module which stands in for a different thing in every Python program. So I'm in favour of keeping an __xxx__ name for it, to emphasise its magic nature. I'm much less likely to accidentally stomp on a magic name than a non-magic one. -- Greg __

Re: [Python-Dev] blocking a non-blocking socket

2007-12-02 Thread Greg Ewing
reasonably expect it to test equal to 0.0. The caveat only applies to results of a calculation, which may incorporate roundoff errors. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] PEP Idea: Syntactic sugar for StopIteration.

2007-12-08 Thread Greg Ewing
Terry Reedy wrote: > I would prefer plain 'yield' to 'yield break' as a synonym for 'raise > StopIteration'. Don't we already have a plain yield these days meaning something else? -- Greg ___ Python-De

Re: [Python-Dev] PEP Idea: Syntactic sugar for StopIteration.

2007-12-08 Thread Greg Ewing
opIteration. So I see no advantage at all to this proposal. -- Greg ___ 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] Signals+Threads (PyGTK waking up 10x/sec).

2007-12-08 Thread Greg Ewing
a good reason for having the fd be an additional mechanism that you can turn on when you want it, but not the core mechanism for dealing with signals. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-de

Re: [Python-Dev] PEP Idea: Syntactic sugar for StopIteration.

2007-12-08 Thread Greg Ewing
s it's solved by 'yield break' I would put it the other way around -- the problem that 'yield break' is meant to solve is already solved by 'return'. So there's no need for change. -- Greg ___ Python-Dev mailing

Re: [Python-Dev] Signals+Threads (PyGTK waking up 10x/sec).

2007-12-11 Thread Greg Ewing
s claim? Even if it doesn't save any power, using CPU unnecessarily is a bad thing for any application to do on a multitasking system. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem!

Re: [Python-Dev] Signals+Threads (PyGTK waking up 10x/sec).

2007-12-12 Thread Greg Ewing
sary. But there's no excuse for using CPU when the application truly isn't doing anything other than waiting for something to happen. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsub

Re: [Python-Dev] functional continuations

2007-12-15 Thread Greg Ewing
rong, or does it misbehave in some obscure way? A test case for this would be to call map() with a function that tries to suspend itself using this mechanism. What happens when you try to resume it? -- Greg ___ Python-Dev mailing list Python-Dev@python.

Re: [Python-Dev] functional continuations

2007-12-15 Thread Greg Ewing
By the way, I wouldn't call this a "continuation", as that word implies a bit more (reusability). It's more like a coroutine or lightweight thread. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mai

Re: [Python-Dev] trunc()

2008-01-28 Thread Greg Ewing
ter the point would give a result more like floor than trunc. -- Greg ___ 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] Incorrect documentation of the raw_input built-in function

2008-01-28 Thread Greg Ewing
prefers using stderr over stdout for prompting, if using the std files for it at all. Writing to stdin would be wrong, since it's usually read-only, even when connected to a terminal. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] Incorrect documentation of the raw_input built-in function

2008-01-28 Thread Greg Ewing
the > utility had insufficient memory in which to operate would not be described. sounds like an out-of-memory message shouldn't be written to stderr, which I'm fairly sure is not the case! -- Greg ___ Python-Dev mailing list Python-Dev@pyth

Re: [Python-Dev] Incorrect documentation of the raw_input built-in function

2008-01-28 Thread Greg Ewing
Guido van Rossum wrote: > On Jan 28, 2008 12:35 AM, Greg Ewing <[EMAIL PROTECTED]> wrote: >>So it appears that the official Unix Way prefers using stderr >>over stdout for prompting, if using the std files for it at all. > > That's a dangerous generalization from

Re: [Python-Dev] Error in PEP3118?

2008-02-11 Thread Greg Ewing
mple is correct, but perhaps somewhat confusing. It might help to add a note to the effect that this example is meant to illustrate that the descriptor doesn't have to exactly match the C description, as long as it describes the same memory layout. -- Greg _

Re: [Python-Dev] Error in PEP3118?

2008-02-11 Thread Greg Ewing
he indices when dealing with Fortran if need be. You would have to do that anyway when accessing the array from C, so it's probably better to have the description always match the C ordering. (Makes things a bit harder for those people writing their Python ex

Re: [Python-Dev] int/float freelists vs pymalloc

2008-02-13 Thread Greg Ewing
Christian Heimes wrote: > By the way objects are always aligned at 8 byte address boundaries. A 12 > or 4 bytes object occupies 16 bytes. Maybe pymalloc should be enhanced so it can cope with certain odd-sized objects, such as 12 bytes? --

Re: [Python-Dev] Adding __format__ to classic classes

2008-02-14 Thread Greg Ewing
Eric Smith wrote: > Are you saying I should call _PyType_Lookup first? No, I think he's saying that you don't need to call _PyType_Lookup at all, because anything that it could find will also be found by PyObject_GetAttr. So just call PyObject_GetAttr and it should Just W

Re: [Python-Dev] Calling a builtin from C code; PEP 3101 format() builtin

2008-02-14 Thread Greg Ewing
uld be better. -- Greg ___ 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] Py_CLEAR to avoid crashes

2008-02-17 Thread Greg Ewing
e. If a caller needs a pointer to an object, shouldn't it be holding a counted reference to it? -- Greg ___ 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] Backporting PEP 3127 to trunk

2008-02-22 Thread Greg Ewing
s having to say "%x".format(_) or some such all the time to see the results in hex. An alternative might be to have some variable that can be set to control the format of numbers printed by the interactive shell. -- Greg ___ Python-Dev ma

Re: [Python-Dev] can't set attributes of built-in/extension type

2008-02-23 Thread Greg Ewing
27;t bother providing a __dict__, since one doesn't normally need to add arbitrary attributes to them, and the overhead would be almost completely wasted. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] C-API status of Python 3?

2008-03-02 Thread Greg Ewing
aberration that was necessary in Python 2 because there wasn't much alternative. -- Greg ___ 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] Compiler used to build Python for Windows

2008-03-04 Thread Greg Ewing
Christian Heimes wrote: > The latest alphas of Python 2.6 and 3.0 are build with VS 2088. Wow, that must be a very, very pre-alpha release... Or has someone at Redmond stolen Guido's time machine? -- Greg Ewing, Computer

Re: [Python-Dev] Documentation reorganization [was: ... for ability to execute zipfiles & directories]

2008-03-04 Thread Greg Ewing
ltins. Maybe the solution is to rename the Library Reference to the Class and Module Reference or something like that. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand

Re: [Python-Dev] Python 2.6 and 3.0 ...and applink.c?

2008-03-04 Thread Greg Ewing
o compile extensions against *that* library instead. If it were compiled with gcc but using one of the Microsoft libraries, the same situation would exist as before. The entire mess is all Microsoft's fault for not picking one version of libc and sticking to it. -- Greg Ewi

Re: [Python-Dev] Python XML Validator

2008-03-04 Thread Greg Ewing
Mike Meyer wrote: > Trying to install it from the repository is a PITA, because > it uses both the easyinstall and Pyrex It shouldn't depend on Pyrex as long as it's distributed with the generated C files. If it's not, that's an oversight on the part of the distributor.

Re: [Python-Dev] Documentation reorganization

2008-03-05 Thread Greg Ewing
Adam Olsen wrote: > The term "Displays" is pretty obscure as well, Hmmm, I'd call them "constructor expressions" or some such. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] Documentation reorganization

2008-03-05 Thread Greg Ewing
e to BNF would be syntax diagrams. They're just as formal, and can be a lot easier to read. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opti

Re: [Python-Dev] Compiler used to build Python for Windows

2008-03-05 Thread Greg Ewing
ant on tools that appear and disappear at the whim of Microsoft. Their "free" compilers only last until the next version, then they become unavailable. So it can still be a problem finding exactly the right version to match your Python installation, if you missed the window of opp

Re: [Python-Dev] Compiler used to build Python for Windows

2008-03-06 Thread Greg Ewing
xtension using one stdio library and the base interpreter another? > Maybe it's possible (and not too late) for > Python to somehow embrace such mechanism? There would have to be an awful lot of stubs to cover the whole Python/C API... but maybe that

Re: [Python-Dev] Complexity documentation request

2008-03-09 Thread Greg Ewing
re some general expectations one should be able to have of any implementation, e.g. that accessing a list item is roughly O(1), and not O(n) as it would be if they were implemented as linked lists. Dict access should probably be documented as no worse than O(log n) to allow for tree implementat

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Greg Ewing
a dict that you've just deleted a lot of things from is to insert something, then delete it again, and then copy. :-) -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http:

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Greg Ewing
is small doesn't necessarily mean the algorithm is efficient. > For a theoretically-reasonable definition of "small", > prepending is O(1): Big O-notation is all about the limit when things get big. So it doesn't make sense to talk about "O() when something is small&quo

Re: [Python-Dev] PEP Proposal: Revised slice objects & lists use slice objects as indexes

2008-03-10 Thread Greg Ewing
27;s much more common to iterate directly over a sequence of things you want to operate on. This is even more true now that we have enumerate(). So this proposal is addressing a fairly small set of use cases. -- Greg ___ Python-Dev mailing list Py

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Greg Ewing
sts as linked lists would make many people unhappy, as their algorithms suddenly went from O(n**m) to O(n**(m+1)) without anyone telling them. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubs

Re: [Python-Dev] Compiler used to build Python for Windows

2008-03-11 Thread Greg Ewing
get at things quickly. -- Greg ___ 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] Complexity documentation request

2008-03-11 Thread Greg Ewing
ask based on experience is good design practice. -- Greg ___ 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] Proxy form not getting through

2008-03-12 Thread Greg Ewing
I'm trying to send a proxy form, but all my mail to [EMAIL PROTECTED] or [EMAIL PROTECTED] is getting bounced. Is there another address I can send it to that goes through a different mail server? -- Greg ___ Python-Dev mailing list Pytho

[Python-Dev] Bug in Pickle protocol involving __setstate__

2008-03-18 Thread Greg Kochanski
If we have a hierarchy of classes, and we use __getstate__/__setstate__, the wrong version of __setstate__ gets called. Possibly, this is a documentation problem, but here goes: Take two classes, A and B, where B is the child of A. Construct a B. Pickle it. Unpickle it, and you find that the

Re: [Python-Dev] Python 3000: Special type for object attributes & map keys

2008-03-18 Thread Greg Ewing
r" idea. If the integers were used to directly index an array instead of being used as dict keys, it might make a difference. The cost would be that every namespace would need to be as big as the number of names in existence, with most of them being extrem

Re: [Python-Dev] The Breaking of distutils and PyPI for Python 3000?

2008-03-19 Thread Greg Ewing
at I'd be happy to discuss. -- Greg ___ 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] PEP 365 (Adding the pkg_resources module)

2008-03-20 Thread Greg Ewing
s, and the existing machinery would take it from there. -- Greg ___ 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] r61709 - python/trunk/Doc/library/functions.rst python/trunk/Doc/library/future_builtins.rst python/trunk/Doc/library/python.rst

2008-03-24 Thread Greg Ewing
r(), so making print alone do this probably wouldn't be very useful. -- Greg ___ 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] How we can get rid of eggs for 2.6 and beyond

2008-03-25 Thread Greg Ewing
e willing and/or able to track down and install dependencies along with an app. -- Greg ___ 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] Decimal(unicode)

2008-03-25 Thread Greg Ewing
y so special, or should bytes be acceptable in any context requiring a string, with an implicit encoding of ascii? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] Decimal(unicode)

2008-03-25 Thread Greg Ewing
ncoded characters. But an equally plausible interpretation might be that it's some binary representation of a number. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubsc

Re: [Python-Dev] Decimal(unicode)

2008-03-25 Thread Greg Ewing
I thought Decimal was going to be replaced by a C implementation soon anyway. If so, is it worth going to much trouble over this? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Decimal(unicode)

2008-03-26 Thread Greg Ewing
Nick Coghlan wrote: > Greg Ewing wrote: > >> I thought Decimal was going to be replaced by a C >> implementation soon anyway. > > I believe that was found to be more trouble than it was worth. That's very disappointing. Was there any discussion of the problems tha

<    11   12   13   14   15   16   17   18   19   20   >