Re: [Python-Dev] small floating point number problem

2006-02-08 Thread Josiah Carlson
Smith [EMAIL PROTECTED] wrote: I just ran into a curious behavior with small floating points, trying to find the limits of them on my machine (XP). Does anyone know why the '0.0' is showing up for one case below but not for the other? According to my tests, the smallest representable float

Re: [Python-Dev] small floating point number problem

2006-02-08 Thread Raymond Hettinger
[Smith] I just ran into a curious behavior with small floating points, trying to find the limits of them on my machine (XP). Does anyone know why the '0.0' is showing up for one case below but not for the other? According to my tests, the smallest representable float on my machine is much

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Thomas Wouters
On Tue, Feb 07, 2006 at 08:53:46PM -0800, Bill Janssen wrote: Perhaps the right idea is to fix the various problems of asyncore. The problem with making asyncore more useful is that you end up with (a cut down version of) Twisted, although not one that would be able to integrate with Twisted.

[Python-Dev] Old Style Classes Goiung in Py3K

2006-02-08 Thread Fuzzyman
Hello all, I understand that old style classes are slated to disappear in Python 3000. Does this mean that the following will be a syntax error : class Something: pass *or* that instead it will automatically inherit from object ? The latter would break a few orders of magnitude less code

[Python-Dev] Make error on solaris 9 x86 - error: parse error before upad128_t

2006-02-08 Thread M, Raveendra Babu (STSD)
Hi, I am trying to build python-2.3.5 on solaris 9 - X86. 1) first I have unpacked : Python-2.3.5.tgz using : tar -zxvf Python-2.3.5.tgz no erros at this stage 2) then run : ./configure No errors at this stage 3)then /usr/ccs/bin/make it is giving some errors

Re: [Python-Dev] Make error on solaris 9 x86 - error: parse errorbefore upad128_t

2006-02-08 Thread Fredrik Lundh
M, Raveendra Babu (STSD) wrote: 3)then /usr/ccs/bin/make it is giving some errors and the error is : gcc -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Python/pythonrun.o Python/pythonrun.c In file included from

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Patrick Collison
After so many attempts to come up with an alternative for lambda, perhaps we should admit defeat. I've not had the time to follow the most recent rounds, but I propose that we keep lambda, so as to stop wasting everybody's talent and time on an impossible quest. I agree with this. The *name*

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Thomas Heller
Martin v. Löwis [EMAIL PROTECTED] writes: I just came up with an idea how to resolve the VC versioning problems for good: Python should link with mscvrt.dll (which is part of the operating system), not with the CRT that the compiler provides. To do that, we would need to compile and link

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Steve Holden
Josiah Carlson wrote: Fredrik Lundh [EMAIL PROTECTED] wrote: Steve Holden wrote: What is the reason that people want to use threads when they can have poll/select-style message processing? Why does Zope require threads? IOW, why would anybody *want* a threadsafe patch for asynchat? In case

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Donovan Baarda
On Wed, 2006-02-08 at 02:33 -0500, Steve Holden wrote: Martin v. Löwis wrote: Tim Peters wrote: [...] What is the reason that people want to use threads when they can have poll/select-style message processing? Why does Zope require threads? IOW, why would anybody *want* a threadsafe patch

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Andrew Bennetts
Donovan Baarda wrote: On Wed, 2006-02-08 at 02:33 -0500, Steve Holden wrote: Martin v. Löwis wrote: Tim Peters wrote: [...] What is the reason that people want to use threads when they can have poll/select-style message processing? Why does Zope require threads? IOW, why would

[Python-Dev] _length_cue()

2006-02-08 Thread Armin Rigo
Hi all, Last september, the __len__ method of iterators was removed -- see discussion at: http://mail.python.org/pipermail/python-dev/2005-September/056879.html It was replaced by an optional undocumented method called _length_cue(), which would be used to guess the number of remaining items in

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Giovanni Bajo
Martin v. Löwis [EMAIL PROTECTED] wrote: I just came up with an idea how to resolve the VC versioning problems for good: Python should link with mscvrt.dll (which is part of the operating system), not with the CRT that the compiler provides. Can you elaborate exactly on which versioning

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Valentino Volonghi aka Dialtone
On Wed, Feb 08, 2006 at 01:23:26PM +, Donovan Baarda wrote: I believe that Twisted does pretty much this with it's deferred stuff. It shoves slow stuff off for processing in a separate thread that re-syncs with the event loop when it's finished. Deferreds are only an elaborate way to deal

Re: [Python-Dev] Old Style Classes Goiung in Py3K

2006-02-08 Thread Georg Brandl
Fuzzyman wrote: Hello all, I understand that old style classes are slated to disappear in Python 3000. Does this mean that the following will be a syntax error : class Something: pass *or* that instead it will automatically inherit from object ? Of course, I would say. There's

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Aahz
On Wed, Feb 08, 2006, Thomas Wouters wrote: Anything beyond simple bugfixes on asyncore/asynchat seems like a terrible waste of effort, to me. And I hardly ever use Twisted. +1 -- Aahz ([EMAIL PROTECTED]) * http://www.pythoncraft.com/ 19. A language that doesn't affect the

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Aahz
On Wed, Feb 08, 2006, Patrick Collison wrote: How about `procedure', or just `proc'? -1 lambdas are *expected* to return a result -- procedures are functions with side-effects that don't return a result. -- Aahz ([EMAIL PROTECTED]) * http://www.pythoncraft.com/ 19. A

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Aahz
On Wed, Feb 08, 2006, Armin Rigo wrote: IMHO for safety reasons we need to stick double-underscores around this name too, e.g. __length_cue__(). It's new in 2.5 and not documented anyway so this change won't break anything. Do you agree with that? +1 -- Aahz ([EMAIL PROTECTED]) *

Re: [Python-Dev] small floating point number problem

2006-02-08 Thread Bengt Richter
On Wed, 08 Feb 2006 03:08:25 -0500, Raymond Hettinger [EMAIL PROTECTED] wrote: [Smith] I just ran into a curious behavior with small floating points, trying to find the limits of them on my machine (XP). Does anyone know why the '0.0' is showing up for one case below but not for the other?

Re: [Python-Dev] math.areclose ...?

2006-02-08 Thread Scott David Daniels
Smith wrote: ... There is a problem with dividing by 'ave' if the x and y are at the floating point limits, but the symmetric behaving form (presented by Scott Daniels) will have the same problem. Upon reflection, 'max' is probably better than averaging, and avoiding divide is also a

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Georg Brandl
Neal Norwitz wrote: On 2/7/06, Christopher Armstrong [EMAIL PROTECTED] wrote: Twisted is wonderful, powerful, rich, and very large. Perhaps a small subset could be carefully extracted The subject of putting (parts of) Twisted into the standard library comes up once every 6 months or so,

[Python-Dev] Python modules should link to libpython

2006-02-08 Thread Gustavo J. A. M. Carneiro
gjc:/usr/lib/python2.4/lib-dynload$ ldd itertools.so libpthread.so.0 = /lib/libpthread.so.0 (0x2abcc000) libc.so.6 = /lib/libc.so.6 (0x2ace2000) /lib/ld-linux-x86-64.so.2 (0x4000) gjc:/usr/lib/python2.4/lib-dynload$ It seems that Python C

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Andrew Koenig
I'm worried about the name. There are now exactly two names that behave like a special method without having the double-underscores around it. The first name is 'next', which is kind of fine because it's for iterator classes only and it's documented. But now, consider: the CPython

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Pedro Werneck
On Wed, 08 Feb 2006 15:42:39 +0100 Georg Brandl [EMAIL PROTECTED] wrote: Neal Norwitz wrote: On 2/7/06, Christopher Armstrong [EMAIL PROTECTED] wrote: Twisted is wonderful, powerful, rich, and very large. Perhaps a small subset could be carefully extracted The subject of putting

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Guido van Rossum
+1 for __length_hint__. Raymond? On 2/8/06, Andrew Koenig [EMAIL PROTECTED] wrote: I'm worried about the name. There are now exactly two names that behave like a special method without having the double-underscores around it. The first name is 'next', which is kind of fine because it's for

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Guido van Rossum
On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: And to think that people thought that keeping lambda, but changing the name, would avoid all the heated discussion... :-) Note that I'm not participating in any attempts to improve lambda. Just about the only improvement I'd like to see is

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Phillip J. Eby
At 10:07 AM 2/8/2006 -0800, Guido van Rossum wrote: On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: And to think that people thought that keeping lambda, but changing the name, would avoid all the heated discussion... :-) Note that I'm not participating in any attempts to improve lambda.

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Martin v. Löwis
Thomas Heller wrote: I'm not sure the platform SDK include files (.H and .IDL) are really compatible with VC7.1. I remember that we (on our company, building C++ software) had to 'Unregister the PSDK Directories with Visual Studio' (available from the start menu) before building the stuff,

Re: [Python-Dev] _length_cue()

2006-02-08 Thread LD 'Gus' Landis
+1 on 'hint' vs 'cue'... also infers 'not definitive' (sort of like having a hint of how much longer the honey do list is... the honey do list is never 'exhaustive', only exhausting! ;-) On 2/8/06, Andrew Koenig [EMAIL PROTECTED] wrote: I'm worried about the name. There are now exactly

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Robert Brewer
Barry Warsaw wrote: On Tue, 2006-02-07 at 16:01 -0800, Robert Brewer wrote: Perhaps, but please keep in mind that the smtpd module uses both, currently, and would have to be rewritten if either is removed. Would that really be a huge loss? It'd be a huge loss for the random fellow

Re: [Python-Dev] Python modules should link to libpython

2006-02-08 Thread Ronald Oussoren
On 8-feb-2006, at 16:47, Gustavo J. A. M. Carneiro wrote: gjc:/usr/lib/python2.4/lib-dynload$ ldd itertools.so libpthread.so.0 = /lib/libpthread.so.0 (0x2abcc000) libc.so.6 = /lib/libc.so.6 (0x2ace2000) /lib/ld-linux-x86-64.so.2 (0x4000)

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Martin v. Löwis
Giovanni Bajo wrote: I just came up with an idea how to resolve the VC versioning problems for good: Python should link with mscvrt.dll (which is part of the operating system), not with the CRT that the compiler provides. Can you elaborate exactly on which versioning problems you think of? I

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Martin v. Löwis
Steve Holden wrote: In case the processing of events needed to block? If I'm processing web requests in an async* dispatch loop and a request needs the results of a (probably lengthy) database query in order to generate its output, how do I give the dispatcher control again to process the

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Barry Warsaw
On Wed, 2006-02-08 at 10:24 -0800, Robert Brewer wrote: It'd be a huge loss for the random fellow who needs to write an email fixup proxy between a broken client and Exim in a couple of hours. ;) Or the guy who needs to whip together an RFC-compliant minimal SMTP server to use in unit tests of

Re: [Python-Dev] Old Style Classes Goiung in Py3K

2006-02-08 Thread Guido van Rossum
On 2/8/06, Fuzzyman [EMAIL PROTECTED] wrote: I understand that old style classes are slated to disappear in Python 3000. Does this mean that the following will be a syntax error : class Something: pass *or* that instead it will automatically inherit from object ? The latter of course.

Re: [Python-Dev] Old Style Classes Goiung in Py3K

2006-02-08 Thread Brett Cannon
On 2/8/06, Georg Brandl [EMAIL PROTECTED] wrote: Fuzzyman wrote: Hello all, I understand that old style classes are slated to disappear in Python 3000. Does this mean that the following will be a syntax error : class Something: pass *or* that instead it will automatically

Re: [Python-Dev] Python modules should link to libpython

2006-02-08 Thread Martin v. Löwis
Gustavo J. A. M. Carneiro wrote: Any thoughts? Should I go ahead and open a bug report (maybe with patch), or is this controversial? You should only link with libpython if there really is a shared libpython. In a standard Python installation, there is no libpython, but instead, symbols are

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Brett Cannon
On 2/8/06, Phillip J. Eby [EMAIL PROTECTED] wrote: At 10:07 AM 2/8/2006 -0800, Guido van Rossum wrote: On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: And to think that people thought that keeping lambda, but changing the name, would avoid all the heated discussion... :-) Note that

Re: [Python-Dev] Python modules should link to libpython

2006-02-08 Thread Ronald Oussoren
On 8-feb-2006, at 19:55, Martin v. Löwis wrote: Gustavo J. A. M. Carneiro wrote: Any thoughts? Should I go ahead and open a bug report (maybe with patch), or is this controversial? I can accept that the Mac does it differently, although I think the rationale for doing that is dangerous:

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Raymond Hettinger
How about (lambda x,y: x**y)? The purpose of this thread was to conserve brain-power by bringing the issue to a close. Instead, it is turning into syntax/renaming fest. May I suggest that this be moved to comp.lang.python and return only if a community consensus emerges from the thousands

Re: [Python-Dev] Python modules should link to libpython

2006-02-08 Thread Bob Ippolito
On Feb 8, 2006, at 11:02 AM, Ronald Oussoren wrote: On 8-feb-2006, at 19:55, Martin v. Löwis wrote: Gustavo J. A. M. Carneiro wrote: Any thoughts? Should I go ahead and open a bug report (maybe with patch), or is this controversial? I can accept that the Mac does it differently,

Re: [Python-Dev] Python modules should link to libpython

2006-02-08 Thread Martin v. Löwis
Ronald Oussoren wrote: My explanation seems to be bad, I meant to say sharing extensions across different builds of the same Python version. One might install a normal unix build in /opt/python and a framework build in /Library/Frameworks. Sorry, I didn't read your message carefully enough.

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Robert Brewer
Raymond Hettinger wrote: How about (lambda x,y: x**y)? The purpose of this thread was to conserve brain-power by bringing the issue to a close. Instead, it is turning into syntax/renaming fest. May I suggest that this be moved to comp.lang.python and return only if a community consensus

Re: [Python-Dev] small floating point number problem

2006-02-08 Thread Tim Peters
[Raymond Hettinger] ... The asymmetric handling of denormals by the atof() and ftoa() functions is why you see a difference. A consequence of that asymmetry is the breakdown of the expected eval(repr(f))==f invariant: Just noting that such behavior is a violation of the 754 standard for

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Steve Holden
Raymond Hettinger wrote: How about (lambda x,y: x**y)? The purpose of this thread was to conserve brain-power by bringing the issue to a close. Instead, it is turning into syntax/renaming fest. May I suggest that this be moved to comp.lang.python and return only if a community

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Keith Dart
Barry Warsaw wrote the following on 2006-02-08 at 13:45 PST: === Or the guy who needs to whip together an RFC-compliant minimal SMTP server to use in unit tests of some random Python implemented mailing list manager. Just fer instance. But still... But I can't speak for how often this

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Keith Dart
Guido van Rossum wrote the following on 2006-02-08 at 10:07 PST: === Note that I'm not participating in any attempts to improve lambda. === FWIW, I like lambda. No need to change it. Thank you. -- -- ~ Keith Dart [EMAIL

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Raymond Hettinger
[Armin Rigo] It was replaced by an optional undocumented method called _length_cue(), which would be used to guess the number of remaining items in an iterator, for performance reasons. I'm worried about the name. There are now exactly two names that behave like a special method without

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Barry Warsaw
On Wed, 2006-02-08 at 11:45 -0800, Keith Dart wrote: There are other, third-party, SMTP server objects available. You could always use one of those. Very true. In fact, Twisted comes to the rescue again here. When I needed to test Mailman's NNTP integration I could either spend several

Re: [Python-Dev] Path PEP: some comments

2006-02-08 Thread Andy Teijelo Pérez
El Sábado, 4 de Febrero de 2006 2:35, Giovanni Bajo escribió: Hello, my comments on the Path PEP: - Many methods contain the word 'path' in them. I suppose this is to help transition from the old library to the new library. But in the context of a new Python user, I don't think that

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Steven Bethard
Robert Brewer wrote: Community consensus on syntax is a pipe dream. +1 QOTF And trust me, it'll be in there, since I'm one of the summary writers. ;-) STeVe -- Grammar am for people who can't think for myself. --- Bucky Katt, Get Fuzzy ___

[Python-Dev] Help on choosing a PEP to volunteer on it : 308, 328 or 343

2006-02-08 Thread Joao Macaiba
Hi. I'm interested in doing an undergraduate project under some Python core PEP. I'm newbie to Python core. Program in C/C++. I've downloaded the sources with svn and now I'm studying it. There are 3 PEP accepted : . 308 : Conditional Expressions . 328 : Imports: Multi-Line and

Re: [Python-Dev] Help on choosing a PEP to volunteer on it : 308, 328 or 343

2006-02-08 Thread Brett Cannon
On 2/8/06, Joao Macaiba [EMAIL PROTECTED] wrote: Hi. I'm interested in doing an undergraduate project under some Python core PEP. I'm newbie to Python core. Program in C/C++. I've downloaded the sources with svn and now I'm studying it. There are 3 PEP accepted : . 308 : Conditional

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Martin v. Löwis
Martin v. Löwis wrote: To do that, we would need to compile and link with the SDK header files and import libraries, not with the ones that visual studio provides. I withdraw that idea. It appears that the platform SDK doesn't (any longer?) provide an import library for msvrt.dll, and

Re: [Python-Dev] Help on choosing a PEP to volunteer on it : 308, 328 or 343

2006-02-08 Thread Raymond Hettinger
[Joao Macaiba] 1. For a newbie in the Python core development, what is the best PEP to begin with ? I recommend, PEP 308: Conditional Expressions Raymond ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Neil Hodgson
Martin v. Löwis: So ideally, Python should drop usage of the CRT entirely (but getting there will be a long process). Hopefully, P3k will drop usage of stdio for file objects, which will be a big step forward. You don't need to drop the CRT, just encapsulate it so there is one copy

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Armin Rigo
Hi Raymond, On Wed, Feb 08, 2006 at 03:02:21PM -0500, Raymond Hettinger wrote: IMHO, the safety reasons are imaginary -- the scenario would involve subclassing one of these builtin objects and attaching an identically named private method. No, the senario applies to any user-defined

Re: [Python-Dev] Help on choosing a PEP to volunteer on it : 308, 328 or 343

2006-02-08 Thread Thomas Wouters
On Wed, Feb 08, 2006 at 01:39:34PM -0800, Brett Cannon wrote: On 2/8/06, Joao Macaiba [EMAIL PROTECTED] wrote: 1. For a newbie in the Python core development, what is the best PEP to begin with ? Wild guess? 308, but that still requires changing the grammar and editing the AST compiler.

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Michael Hudson
Guido van Rossum [EMAIL PROTECTED] writes: On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: And to think that people thought that keeping lambda, but changing the name, would avoid all the heated discussion... :-) Note that I'm not participating in any attempts to improve lambda. Just

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Mark Edgington
Martin v. Löwis wrote: That patch looks wrong. What does it mean to run in a thread? All code runs in a thread, all the time: sometime, that thread is the main thread. Furthermore, I can't see any presumed thread-unsafety in asynchat. Ok, perhaps the notation could be improved, but the

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Pedro Werneck
On Wed, 08 Feb 2006 15:42:39 +0100 Georg Brandl [EMAIL PROTECTED] wrote: Neal Norwitz wrote: On 2/7/06, Christopher Armstrong [EMAIL PROTECTED] wrote: Twisted is wonderful, powerful, rich, and very large. Perhaps a small subset could be carefully extracted The subject of putting

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Jiwon Seo
On 2/8/06, Guido van Rossum [EMAIL PROTECTED] wrote: On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: And to think that people thought that keeping lambda, but changing the name, would avoid all the heated discussion... :-) Note that I'm not participating in any attempts to improve

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Josiah Carlson
Jiwon Seo [EMAIL PROTECTED] wrote: On 2/8/06, Guido van Rossum [EMAIL PROTECTED] wrote: On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: And to think that people thought that keeping lambda, but changing the name, would avoid all the heated discussion... :-) Note that I'm not

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Bill Janssen
Not terrible. I think I may try re-working Medusa to use this. Bill ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Raymond Hettinger
[Armin Rigo] Hi Raymond, . . . This means that _length_cue() is at the moment a special method, in the sense that Python can invoke it implicitely. Okay, that makes sense. Go ahead and make the swap. This said, do we vote for __length_hint__ or __length_cue__? :-) I prefer __length_cue__

Re: [Python-Dev] Help on choosing a PEP to volunteer on it : 308, 328 or 343

2006-02-08 Thread Brett Cannon
On 2/8/06, Thomas Wouters [EMAIL PROTECTED] wrote: On Wed, Feb 08, 2006 at 01:39:34PM -0800, Brett Cannon wrote: On 2/8/06, Joao Macaiba [EMAIL PROTECTED] wrote: 1. For a newbie in the Python core development, what is the best PEP to begin with ? Wild guess? 308, but that still

[Python-Dev] email 3.1 for Python 2.5 using PEP 8 module names

2006-02-08 Thread Barry Warsaw
I posted a message to the email-sig expressing my desire to change our module naming scheme to conform to PEP 8. This would entail a bump in the email version to 3.1, and would be included in Python 2.5. Of course, the old names would still work, for at least one Python release. All the

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Greg Ewing
Martin v. Löwis wrote: I withdraw that idea. It appears that the platform SDK doesn't (any longer?) provide an import library for msvrt.dll, and Microsoft documents mscvrt as intended only for system components. Insofar as it forms a base on which other separately- compiled pieces of code

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Greg Ewing
Neil Hodgson wrote: You don't need to drop the CRT, just encapsulate it so there is one copy controlled by Python that hands out wrapped objects (file handles, file pointers, memory blocks, others?). These wrappers can only be manipulated through calls back to that owning code that then

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Greg Ewing
Armin Rigo wrote: This said, do we vote for __length_hint__ or __length_cue__? :-) I prefer something containing hint rather than cue because it more explicitly says what we mean. I feel that __length_hint__ is a bit long, though. We have __len__, not __length__, so maybe it should be

[Python-Dev] Let's send lambda to the shearing shed (Re: Let's just *keep* lambda)

2006-02-08 Thread Greg Ewing
My thought on lambda at the moment is that it's too VERBOSE. If a syntax for anonymous functions is to pull its weight, it needs to be *very* concise. The only time I ever consider writing a function definition in-line is when the body is extremely short, otherwise it's clearer to use a def

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Jiwon Seo
On 2/8/06, Josiah Carlson [EMAIL PROTECTED] wrote: Jiwon Seo [EMAIL PROTECTED] wrote: On 2/8/06, Guido van Rossum [EMAIL PROTECTED] wrote: On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: And to think that people thought that keeping lambda, but changing the name, would avoid

Re: [Python-Dev] [BULK] Python-Dev Digest, Vol 31, Issue 37

2006-02-08 Thread Smith
| From: Michael Hudson [EMAIL PROTECTED] | Guido van Rossum [EMAIL PROTECTED] writes: | || On 2/8/06, Patrick Collison [EMAIL PROTECTED] wrote: ||| And to think that people thought that keeping lambda, but changing ||| the name, would avoid all the heated discussion... :-) || || Note that I'm

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Josiah Carlson
Jiwon Seo [EMAIL PROTECTED] wrote: On 2/8/06, Josiah Carlson [EMAIL PROTECTED] wrote: Closures already exist in Python. def foo(bar): ... return lambda: bar + 1 ... a = foo(5) a() 6 Not in that we don't have anonymous function (or closure) with multiple statements. As

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Josiah Carlson
Mark Edgington [EMAIL PROTECTED] wrote: Martin v. Löwis wrote: That patch looks wrong. What does it mean to run in a thread? All code runs in a thread, all the time: sometime, that thread is the main thread. Furthermore, I can't see any presumed thread-unsafety in asynchat.

Re: [Python-Dev] _length_cue()

2006-02-08 Thread Greg Ewing
Raymond Hettinger wrote: [Andrew Koenig] Might I suggest that at least you consider using hint instead of cue? Personally, I prefer cue which my dictionary defines as a signal, hint, or suggestion. The alternate definition of a prompt for some action applies equally well. No, it

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Martin v. Löwis
Greg Ewing wrote: As far as I can see, Microsoft have created an intractable mess here. Their solution of compile your whole program with the same CRT completely misses the possibility that the whole program may consist of disparate separately- written and separately-compiled parts, and there

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Martin v. Löwis
Jiwon Seo wrote: Then, is there any chance anonymous function - or closure - is supported in python 3.0 ? Or at least have a discussion about it? That discussion appears to be closed (or, not really: everybody can discuss, but it likely won't change anything). (IMHO, closure is very handy for

Re: [Python-Dev] Help with Unicode arrays in NumPy

2006-02-08 Thread Travis Oliphant
Thank you, Martin and Stephen, for the suggestions and comments. For your information: We decided that all NumPy arrays of unicode strings will use UCS4 for internal representation. When an element of the array is selected, a unicodescalar (which inherits directly from the unicode builtin

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Neil Hodgson
Martin v. Löwis: I don't think this would be good enough. I then also need a way to provide extension authors with an API that looks like the CRT, but isn't: they cannot realistically change all their code to use the wrapped objects. In a recent case, somebody tried to passed a FILE* to a

Re: [Python-Dev] Linking with mscvrt

2006-02-08 Thread Neil Hodgson
Greg Ewing: But that won't help when you need to deal with third-party code that knows nothing about Python or its wrapped file objects, and calls the CRT (or one of the myriad extant CRTs, chosen at random:-) directly. Can you explain exactly why there is a problem here? Its fairly