Re: [Python-Dev] Non-blocking sockets, asynchronous connects and select.select.

2007-03-19 Thread Josiah Carlson
"Alan Kennedy" <[EMAIL PROTECTED]> wrote: > I'm working on a select implementation for jython (in combination with > non-blocking sockets), and a set of unit tests for same. Great! [snip] > But when I run the code on cpython, the code reports that both calls > would block, i.e. that neither side

Re: [Python-Dev] Status of thread cancellation

2007-03-15 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Can you suggest any use-cases for thread termination which will *not* > > result in a completely broken and unpredictable heap after the thread > > has died? > > Suppose you have a GUI and you want to launch a > long-run

Re: [Python-Dev] thread safe SMTP module

2007-03-14 Thread Josiah Carlson
Gordon Messmer <[EMAIL PROTECTED]> wrote: > After some discussion, Aahz suggested that I discuss the problem here, > on python-dev. He seemed to think that the problem I saw may have been > an indication of a bug in python. Could anyone take a look at that > thread and say whether it looks li

Re: [Python-Dev] splitext('.cshrc')

2007-03-07 Thread Josiah Carlson
Andrew Bennetts <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > [...] > > > > Offer a new splitext that uses X on posix and Y on win32, but causes a > > DeprecationWarning with pointers to the two renamed functions that are > > available on both

Re: [Python-Dev] splitext('.cshrc')

2007-03-07 Thread Josiah Carlson
Andrew Bennetts <[EMAIL PROTECTED]> wrote: > Glyph's proposing that rather than risk breaking existing code (and in the > worst > possible way: silently, giving wrong answers rather than exceptions), we > examine > what benefits changing splitext would bring, and see if there's a way to get > th

Re: [Python-Dev] Encouraging developers

2007-03-07 Thread Josiah Carlson
Giovanni Bajo <[EMAIL PROTECTED]> wrote: > On 3/6/2007 3:11 AM, Josiah Carlson wrote: > > Giovanni Bajo <[EMAIL PROTECTED]> wrote: > >> I think this should be pushed to its extreme consequences for the standard > >> library. Patching the standard libr

Re: [Python-Dev] splitext('.cshrc')

2007-03-07 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Phillip J. Eby schrieb: > > I consider it correct, or at the least, don't think it should be > > changed, as it would make the behavior more difficult to reason about > > and introduce yet another thing to worry about when writing > > cross-version

Re: [Python-Dev] Encouraging developers

2007-03-05 Thread Josiah Carlson
Giovanni Bajo <[EMAIL PROTECTED]> wrote: > On 05/03/2007 20.30, Phil Thompson wrote: > > 2. Publically identify the core developers and their areas of expertise and > > responsibility (ie. which parts of the source tree they "own"). > > I think this should be pushed to its extreme consequences f

Re: [Python-Dev] Windows compiler for Python 2.6+

2007-02-28 Thread Josiah Carlson
"Chris AtLee" <[EMAIL PROTECTED]> wrote: > I just got bitten by the runtime library incompatibility problem on > windows when I tried to load a C extension compiled with MSVC 2005 > (64-bit) into Python 2.5. I would guess it is more an issue of 32bit + 64bit dynamic linking having issues, but I c

Re: [Python-Dev] bool conversion wart?

2007-02-26 Thread Josiah Carlson
Jordan Greenberg <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > How would this change be helpful? I'm utterly mystified by these > > suggestions that bool would be more useful if it didn't behave like an > > int in arithmetic. > > I don't think anyones really saying it would be more

Re: [Python-Dev] A "record" type (was Re: Py2.6 ideas)

2007-02-23 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > Larry Hastings <[EMAIL PROTECTED]> wrote: > > > >> Josiah Carlson wrote: > >> > >>> one thing to note with your method - you can't guaran

Re: [Python-Dev] A "record" type (was Re: Py2.6 ideas)

2007-02-21 Thread Josiah Carlson
"Steven Bethard" <[EMAIL PROTECTED]> wrote: [snip] > In short, for object construction and attribute access, the Record > class is faster (because __init__ is a simple list of assignments and > attribute access is through C-level slots). For unpacking and > iteration, the NamedTuple factory is fa

Re: [Python-Dev] A "record" type (was Re: Py2.6 ideas)

2007-02-21 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > one thing to note with your method - you can't guarantee the order > > of the attributes as they are being displayed. > > > Actually, my record type *can*; see the hack using the

Re: [Python-Dev] A "record" type (was Re: Py2.6 ideas)

2007-02-20 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > > Steven Bethard wrote: > > On 2/20/07, Larry Hastings <[EMAIL PROTECTED]> wrote: > >> I considered using __slots__, but that was gonna take too long. > > Here's a simple implementation using __slots__: > > Thanks for steering me to it. However, your

Re: [Python-Dev] Py2.6 ideas

2007-02-20 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > For new code, I can't think of a single place I'd want to use a > "NamedTuple" where a "record" wouldn't be arguably more suitable. The > "NamedTuple" makes sense only for "fixing" old APIs like os.stat. I disagree. def add(v1, v2) retu

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Josiah Carlson
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > > Raymond Hettinger schrieb: > >> d, g, v, t, r = model(somecontract) > > [MvL] > > I find that line quite unreadable > > Of course, I can't give you the fully spelled-out line from proprietary code. > But at this point we're just talking about t

Re: [Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)

2007-02-15 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Larry Hastings schrieb: > > Oof! I'm embarrassed to have forgotten that. But that's not a fatal > > problem. It means that on Windows the PerfectReactor must service the > > blocking GetMessage loop, and these other threads notify the > > Per

Re: [Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)

2007-02-15 Thread Josiah Carlson
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > On Thu, 15 Feb 2007 13:55:31 -0800, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > > >Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > [snip] > >> > >> Now if we can only figu

Re: [Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)

2007-02-15 Thread Josiah Carlson
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Thu, 15 Feb 2007 02:36:22 -0700, Andrew Dalke <[EMAIL PROTECTED]> wrote: [snip] > >2) asyncore is > >smaller and easier to understand than Twisted, > > While I hear this a lot, applications written with Twisted _are_ shorter and > contain less i

Re: [Python-Dev] microthreading vs. async io

2007-02-15 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] schrieb: > > Asyncore *only* implements asynchronous IO -- any "tasks" performed in > > its context are the direct result of an IO operation, so it's hard to > > say it implements cooperative multitasking (and Josiah can correct m

Re: [Python-Dev] Interning string subtype instances

2007-02-14 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > > Assuming that dictionaries and the hash algorithm for strings is not > > hopelessly broken, I believe that one discovers quite quickly when two > > strings are not equal. > > You

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

2007-02-14 Thread Josiah Carlson
Tristan Seligmann <[EMAIL PROTECTED]> wrote: > * Richard Tew <[EMAIL PROTECTED]> [2007-02-14 16:49:03 +]: > > > I am not writing a competing event driven mechanism. What I was doing > > was feeling out whether there was any interest in better support for > > asynchronous calls. > > I interp

Re: [Python-Dev] Interning string subtype instances

2007-02-14 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > def intern(st): > > ... > > > > If I remember the implementation of intern correctly, that's more or > > less what happens under the covers. > > That doesn't qu

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

2007-02-13 Thread Josiah Carlson
"Greg Falcon" <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > Also, Nick's examples show (conceptual) > > aliasing problems: after "x = attrview(y)", both x and y refer to the > > same object, but use a different notation to access it. > > Of course there is an aliasing here, but it's be

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

2007-02-13 Thread Josiah Carlson
Ron Adam <[EMAIL PROTECTED]> wrote: > Georg Brandl wrote: > Would it be possible for attrview to be a property? Yes, but getting the right spelling will be hard. > Something like... (Probably needs more than this to handle all cases.) > > class obj(object): > def _attrview(self):

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

2007-02-13 Thread Josiah Carlson
Anthony Baxter <[EMAIL PROTECTED]> wrote: > > The performance question is important, certainly. Initial > > reaction on python-ideas was that a 1% cost would not count as > > substantial > > I'd disagree. Those 1% losses add up, and it takes a heck of a lot > of work to claw them back. Again, t

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

2007-02-12 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Richard Tew schrieb: > > but at that stage I need to > > poll two different resources for events. In order to avoid this it makes > > sense to stop using asyncore for sockets and to write a new > > replacement socket object based on IO completion por

Re: [Python-Dev] Interning string subtype instances

2007-02-12 Thread Josiah Carlson
Hrvoje Nikšic <[EMAIL PROTECTED]> wrote: > > I propose modifying PyString_InternInPlace to better cope with string > subtype instances. Any particular reason why the following won't work for you? _interned = {} def intern(st): #add optional type checking here if st not in _interned:

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

2007-02-08 Thread Josiah Carlson
"Guido van Rossum" <[EMAIL PROTECTED]> wrote: > > I recently needed to access an HTTP URL with a timeout. I ended up > monkey-patching httplib.HTTPConnection so that the connect() method > has an optional second paramer, timeout, defaulting to None; if not > None, a call to settimeout() is added

Re: [Python-Dev] __dir__ and __all__

2007-02-04 Thread Josiah Carlson
See the two threads started in python-dev by Tomer Filiba on (according to my clock) July 6, 2006 and October 6, 2006, both have __dir__ in the subject. - Josiah Giovanni Bajo <[EMAIL PROTECTED]> wrote: > > Hello, > > I could not find a PEP for __dir__. I was thinking today that if __dir__ wa

Re: [Python-Dev] Happy Birthday, Guido!

2007-01-31 Thread Josiah Carlson
"Guido van Rossum" <[EMAIL PROTECTED]> wrote: > Thank you guys! Now I want something fun to do with my life again too! :-) You could hand BDFL responsibilities off onto perhaps Tim, Raymond, or Martin for a few months and try to convince Google to open an office in Hawaii. Pick up one of those T

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

2007-01-26 Thread Josiah Carlson
Nick Maclaren <[EMAIL PROTECTED]> wrote: > > Oops. Something else fairly major I forgot to ask. Python long. > I can't find any clean way of converting to or from this, and > would much rather not build a knowledge of long's internals into > my code. Going via text is, of course, possible - bu

Re: [Python-Dev] syntax misfeature (exception)

2007-01-21 Thread Josiah Carlson
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > > At 01:17 PM 1/20/2007, Josiah Carlson wrote: > > >Neal Becker <[EMAIL PROTECTED]> wrote: > >[snip] > > > It's not a question, it's a critique. I believe this is a misfeature > &g

Re: [Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Josiah Carlson
Neal Becker <[EMAIL PROTECTED]> wrote: [snip] > It's not a question, it's a critique. I believe this is a misfeature since > it's so easy to make this mistake. And it is going away with Py3k. Making it go away for Python 2.6 would either allow for two syntaxes to do the same thing, or would req

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

2007-01-19 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Josiah Carlson schrieb: > > Seems to me like a bug, but the bug could be fixed if the module's > > dictionary kept a (circular) reference to the module object. Who else > > has been waiting for

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

2007-01-18 Thread Josiah Carlson
"Brett Cannon" <[EMAIL PROTECTED]> wrote: > I have discovered an issue relating to func_globals for functions and > the deallocation of the module it is contained within. Let's say you > store a reference to the function encodings.search_function from the > 'encodings' module (this came up in C c

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

2007-01-17 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > I just ran a quickie experiment and determined: when leaving a scope, > variables are deleted FIFO, aka in the same order they were created. > This surprised me; I'd expected them to be deleted LIFO, aka last > first. Why is it thus? Is this behavi

Re: [Python-Dev] The bytes type

2007-01-12 Thread Josiah Carlson
"Terry Reedy" <[EMAIL PROTECTED]> wrote: > "A.M. Kuchling" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | [*] Anyone else keep wanting to write "byte type"? > > All the other builtin types I can think of are singular. So I think byte > should be also. But a "byte" already

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

2007-01-07 Thread Josiah Carlson
"Christos Georgiou" <[EMAIL PROTECTED]> wrote: > > Hello, people. I am not sure whether this is a bug or intentional, so I > thought checking it with you before opening a bug. I will explain this > issue, but please understand this is not a question for help to change the > algorithm (this has

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

2006-12-23 Thread Josiah Carlson
Evgeniy Khramtsov <[EMAIL PROTECTED]> wrote: > Mike Klaas пишет: > > > I'm not sure how having python execute code at an arbitrary time would > > _reduce_ race conditions and/or deadlocks. And if you want to make it > > safe by executing code that shares no variables or resources, then it >

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

2006-12-22 Thread Josiah Carlson
Evgeniy Khramtsov <[EMAIL PROTECTED]> wrote: > > The question to python core developers: > Is there any plans to implement non-blocking timer like a > threading.Timer() but without thread? > Some interpreted languages (like Tcl or Erlang) have such functionality, > so I think it would be a grea

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

2006-12-22 Thread Josiah Carlson
Jeremy Kloth <[EMAIL PROTECTED]> wrote: > [[ This may be somewhat c.l.p.-ish but I feel that this crossed into CPython > development enough to merit posting here ]] > > I have received a bug report for 4Suite that involves a PyObject_IsInstance > check failing for what appears to be the correct

Re: [Python-Dev] Windows SDK

2006-12-09 Thread Josiah Carlson
"Albert Strasheim" <[EMAIL PROTECTED]> wrote: > As part of the Windows Vista release, Microsoft have created the "Windows > SDK" that looks like Platform SDK on steroids. It includes 32-bit and 64-bit > libraries and compilers, debugging tools, etc. and supports Windows XP, > Windows Server 200

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

2006-12-08 Thread Josiah Carlson
> On 12/8/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > fwiw, I've seen a 2.5x ratio for my stuff over the last year; I've always > > assumed > > that most people on other platforms are simply getting their stuff from the > > vendor's > > standard repository. I've noticed a similar thing, bu

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

2006-12-08 Thread Josiah Carlson
Alastair Houghton <[EMAIL PROTECTED]> wrote: > On 7 Dec 2006, at 21:47, Josiah Carlson wrote: > > If we were going to go with slicing, then it would be fairly > > trivial to > > include the whole match range. Some portion of the underlying > > structure >

Re: [Python-Dev] help for a noob - version for a sharp ARM

2006-12-07 Thread Josiah Carlson
a Fred <[EMAIL PROTECTED]> wrote: > > I'm looking for advice on stripping down Python for an SBC to run Numpy > and Scipy. I have the following notes on the system > > We have code that requires recent versions of Numpy and Scipy. > The processor is a 32 bit Sharp ARM Sharp LH7A404 32 bit ARM9

Re: [Python-Dev] features i'd like [Python 3000?] ... #4: interpolated strings ala perl

2006-12-07 Thread Josiah Carlson
"Alexey Borzenkov" <[EMAIL PROTECTED]> wrote: > It can even be simpler and more powerful: > > class evallookup: >def __init__(self, nsg, nsl): > self.nsg = nsg > self.nsl = nsl >def __getitem__(self, name): > return eval(name, self.nsg, self.nsl) Never use eval in any c

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

2006-12-07 Thread Josiah Carlson
"Michael Urman" <[EMAIL PROTECTED]> wrote: > On 12/6/06, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > Special cases aren't special enough to break the rules. > > Sure, but where is this rule that would be broken? I've seen it > invoked, but

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

2006-12-07 Thread Josiah Carlson
Alastair Houghton <[EMAIL PROTECTED]> wrote: > On 7 Dec 2006, at 02:01, Josiah Carlson wrote: > > Alastair Houghton <[EMAIL PROTECTED]> wrote: > >> On 7 Dec 2006, at 01:01, Josiah Carlson wrote: > >>> If we don't want > >>> sl

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

2006-12-07 Thread Josiah Carlson
"Michael Urman" <[EMAIL PROTECTED]> wrote: > On 12/7/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > (and while you guys are waiting, I suggest you start a new thread where > > you discuss some other inconsistency that would be easy to solve with > > more code in the interpreter, like why "-", "/

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

2006-12-06 Thread Josiah Carlson
"Michael Urman" <[EMAIL PROTECTED]> wrote: > On 12/6/06, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > *We* may not be confused, but it's not about us (I'm personally happy to > > use the .group() interface); it's about relative newbies who, gen

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

2006-12-06 Thread Josiah Carlson
Alastair Houghton <[EMAIL PROTECTED]> wrote: > On 7 Dec 2006, at 01:01, Josiah Carlson wrote: > > *We* may not be confused, but it's not about us (I'm personally > > happy to > > use the .group() interface); it's about relative newbies who, > >

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

2006-12-06 Thread Josiah Carlson
Alastair Houghton <[EMAIL PROTECTED]> wrote: > On 6 Dec 2006, at 20:29, Josiah Carlson wrote: > > > The problem is that either we return a list (easy), or we return > > something that is basically another match object (not quite so easy). > > Either way, we would be

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

2006-12-06 Thread Josiah Carlson
Alastair Houghton <[EMAIL PROTECTED]> wrote: > On 5 Dec 2006, at 15:51, Fredrik Lundh wrote: > > Alastair Houghton wrote: > >> or > >> > >>m[3:4] > >> > >> fail to do what they expect. > > > > the problem with slicing is that people may 1) expect a slice to > > return > > a new object *of th

Re: [Python-Dev] LSB: pyc stability

2006-12-04 Thread Josiah Carlson
Neil Toronto <[EMAIL PROTECTED]> wrote: > compresses quite well. Can Python import modules from encrypted ZIP > files? That'd be an interesting way to protect a trade secret, and > probably safer (in the courts) than distributing bytecode. An import hook would do it. - Josiah ___

Re: [Python-Dev] features i'd like [Python 3000?] ... #4: interpolated strings ala perl

2006-12-04 Thread Josiah Carlson
Ben Wing <[EMAIL PROTECTED]> wrote: > > sorry to be casting multiple ideas at once to the list. i've been > looking into other languages recently and reading the recent PEP's and > such and it's helped crystallize ideas about what could be better about > python. > > i see in PEP 3101 that th

Re: [Python-Dev] Importing .pyc in -O mode and vice versa

2006-11-06 Thread Josiah Carlson
Armin Rigo <[EMAIL PROTECTED]> wrote: > Hi Martin, > On Sat, Nov 04, 2006 at 04:47:37PM +0100, "Martin v. L?wis" wrote: > > Patch #1346572 proposes to also search for .pyc when OptimizeFlag > > is set, and for .pyo when it is not set. The author argues this is > > for consistency, as the zipimport

Re: [Python-Dev] Feature Request: Py_NewInterpreter to create separate GIL (branch)

2006-11-06 Thread Josiah Carlson
Talin <[EMAIL PROTECTED]> wrote: > > Guido van Rossum wrote: > > I don't know how you define simple. In order to be able to have > > separate GILs you have to remove *all* sharing of objects between > > interpreters. And all other data structures, too. It would probably > > kill performance too,

Re: [Python-Dev] Status of pairing_heap.py?

2006-11-05 Thread Josiah Carlson
ess memory overall (if there exists a list "free list"), but this should give you something to start with. - Josiah > Paul > > On 11/4/06, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > > > "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > &

Re: [Python-Dev] Status of pairing_heap.py?

2006-11-04 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Paul Chiusano schrieb: > > To support this, the insert method needs to return a reference to an > > object which I can then pass to adjust_key() and delete() methods. > > It's extremely difficult to have this functionality with array-based > > heaps b

Re: [Python-Dev] The "lazy strings" patch [was: PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom]

2006-11-03 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > But I'm open > to suggestions, on this or any other aspect of the patch. As Martin, I, and others have suggested, direct the patch towards Python 3.x unicode text. Also, don't be surprised if Guido says no... http://mail.python.org/pipermail/python-30

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-31 Thread Josiah Carlson
"Paul Moore" <[EMAIL PROTECTED]> wrote: > On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > Martin v. Löwis wrote: > > > [...] because I still don't quite understand what the PEP > > > wants to achieve. > > > > > > > Are you saying you still don't understand after having read the extende

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-29 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Josiah Carlson schrieb: > > One could also toss wxPython, VTK, or any one of the other GUI libraries > > into the mix for visualizing those images, of which wxPython just > > acquired no-copy display of PIL

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-29 Thread Josiah Carlson
"Paul Moore" <[EMAIL PROTECTED]> wrote: > On 10/29/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Travis E. Oliphant schrieb: > > > Remember the context that the data-format object is presented in. Two > > > packages need to share a chunk of memory (the package authors do not > > > know eac

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-28 Thread Josiah Carlson
"M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: > > Travis E. Oliphant wrote: > > M.-A. Lemburg wrote: > >> Travis E. Oliphant wrote: > >>> > >>> > >>> PEP: > >>> Title: Adding data-type objects to the standard library > >>> A

Re: [Python-Dev] The "lazy strings" patch

2006-10-23 Thread Josiah Carlson
"Paul Moore" <[EMAIL PROTECTED]> wrote: > I had picked up on this comment, and I have to say that I had been a > little surprised by the resistance to the change based on the "code > would break" argument, when you had made such a thorough attempt to > address this. Perhaps others had missed this

Re: [Python-Dev] The "lazy strings" patch

2006-10-22 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > It was/is my understanding that the early days of a new major revision > was the most judicious time to introduce big changes. If I had offered > these patches six months ago for 2.5, they would have had zero chance of > acceptance. But 2.6 is in it

Re: [Python-Dev] The "lazy strings" patch

2006-10-21 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: > > I've significantly enhanced my string-concatenation patch, to the point > where that name is no longer accurate. So I've redubbed it the "lazy > strings" patch. [snip] Honestly, I don't believe that pure strings should be this complicated. The im

Re: [Python-Dev] 2.3.6 for the unicode buffer overrun

2006-10-13 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Thomas Heller schrieb: > > Yes. But I've switched machines since I last build an installer, and I do > > not > > have all of the needed software installed any longer, for example the Wise > > Installer. > > Ok. So we are technically incapable o

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-13 Thread Josiah Carlson
Larry Hastings <[EMAIL PROTECTED]> wrote: [snip] > The machine is dual-core, and was quiescent at the time. XP's scheduler > is hopefully good enough to just leave the process running on one core. It's not. Go into the task manager (accessable via Ctrl+Alt+Del by default) and change the proces

Re: [Python-Dev] Cloning threading.py using proccesses

2006-10-11 Thread Josiah Carlson
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Josiah Carlson wrote: > > > It would basically be something along the lines of cPickle, but would > > only support the basic types of: int, long, float, str, unicode, tuple, > > list, dictionary. > > if you're

Re: [Python-Dev] Cloning threading.py using proccesses

2006-10-11 Thread Josiah Carlson
"Richard Oudkerk" <[EMAIL PROTECTED]> wrote: > On 10/10/06, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > > the really interesting thing here is a ready-made threading-style API, I > > > think. reimplementing queues, locks, and semaphores can be a rea

Re: [Python-Dev] Cloning threading.py using proccesses

2006-10-11 Thread Josiah Carlson
"M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >> Josiah Carlson wrote: > >> > >>> Presumably with this library you have created, you have also written a > >

Re: [Python-Dev] Cloning threading.py using proccesses

2006-10-10 Thread Josiah Carlson
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > > Presumably with this library you have created, you have also written a > > fast object encoder/decoder (like marshal or pickle). If it isn't any > > faster than cPickle or marshal, th

Re: [Python-Dev] Cloning threading.py using proccesses

2006-10-10 Thread Josiah Carlson
"Richard Oudkerk" <[EMAIL PROTECTED]> wrote: > I am not sure how sensible the idea is, but I have had a first stab at > writing a module processing.py which is a near clone of threading.py > but uses processes and sockets for communication. (It is one way of > avoiding the GIL.) On non-windows p

Re: [Python-Dev] if __debug__: except Exception, e: pdb.set_trace()

2006-10-09 Thread Josiah Carlson
"Calvin Spealman" <[EMAIL PROTECTED]> wrote: > > I know I can not do this, but what are the chances on changing the > rules so that we can? Basically, since the if __debug__: lines are > processed before runtime, would it be possible to allow them to be > used to control the inclusion or omission

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-07 Thread Josiah Carlson
Nicko van Someren <[EMAIL PROTECTED]> wrote: > It's not like having this patch is going to force anyone to change > the way they write their code. As far as I can tell it simply offers > better performance if you choose to express your code in some common > ways. If it speeds up pystone by

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-06 Thread Josiah Carlson
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Ron Adam wrote: > > > I think what may be missing is a larger set of higher level string > > functions > > that will work with lists of strings directly. Then lists of strings can > > be > > thought of as a mutable string type by its use, and the

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-05 Thread Josiah Carlson
"Gregory P. Smith" <[EMAIL PROTECTED]> wrote: > > > I've never liked the "".join([]) idiom for string concatenation; in my > > opinion it violates the principles "Beautiful is better than ugly." and > > "There should be one-- and preferably only one --obvious way to do it.". > > (And perhaps s

Re: [Python-Dev] Caching float(0.0)

2006-10-03 Thread Josiah Carlson
Steve Holden <[EMAIL PROTECTED]> wrote: > Josiah Carlson wrote: > [yet more on this topic] > > If the brainpower already expended on this issue were proportional to > its significance then we'd be reading about it on CNN news. Goodness, I wasn't aware that poin

Re: [Python-Dev] Caching float(0.0)

2006-10-03 Thread Josiah Carlson
Alastair Houghton <[EMAIL PROTECTED]> wrote: > On 3 Oct 2006, at 17:47, James Y Knight wrote: > > > On Oct 3, 2006, at 8:30 AM, Martin v. Löwis wrote: > >> As Michael Hudson observed, this is difficult to implement, though: > >> You can't distinguish between -0.0 and +0.0 easily, yet you should.

Re: [Python-Dev] Caching float(0.0)

2006-10-02 Thread Josiah Carlson
Michael Hudson <[EMAIL PROTECTED]> wrote: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: > > Kristján V. Jónsson schrieb: > >> I can't see how this situation is any different from the re-use of > >> low ints. There is no fundamental law that says that ints below 100 > >> are more common than oth

Re: [Python-Dev] Python Doc problems

2006-09-29 Thread Josiah Carlson
"BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: > > If there are "rampant criticisms" of the Python docs, then those that > > are complaining should take specific examples of their complaints to the > > sourceforge bug tracker and submit documentation patches for the > > relevant sections. And perso

Re: [Python-Dev] Python Doc problems

2006-09-28 Thread Josiah Carlson
xah lee <[EMAIL PROTECTED]> wrote: > There are a lot reports on the lousy state of python docs. I'm not > much in the python community so i don't know what the developers are > doing anything about it. I don't know about everyone else, but when I recieve comments like "the docs are lousy, fix

Re: [Python-Dev] New relative import issue

2006-09-22 Thread Josiah Carlson
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > At 12:42 PM 9/22/2006 -0700, Josiah Carlson wrote: [snip] > Measure it. Be sure to include the time to import SQLite vs. the time to > import the zipimport module. [snip] > Again, seriously, compare this against a zipfil

Re: [Python-Dev] Suggestion for a new built-in - flatten

2006-09-22 Thread Josiah Carlson
"Bob Ippolito" <[EMAIL PROTECTED]> wrote: > On 9/22/06, Brian Harring <[EMAIL PROTECTED]> wrote: > > On Fri, Sep 22, 2006 at 12:05:19PM -0700, Bob Ippolito wrote: > > > I think instead of adding a flatten function perhaps we should think > > > about adding something like Erlang's "iolist" support.

Re: [Python-Dev] New relative import issue

2006-09-22 Thread Josiah Carlson
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > At 12:08 AM 9/22/2006 -0700, Josiah Carlson wrote: > >"Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > > > At 08:44 PM 9/21/2006 -0700, Josiah Carlson wrote: [snip] > You misunderstood me: I mea

Re: [Python-Dev] Suggestion for a new built-in - flatten

2006-09-22 Thread Josiah Carlson
Michael Foord <[EMAIL PROTECTED]> wrote: > > Hello all, > > I have a suggestion for a new Python built in function: 'flatten'. This has been brought up many times. I'm -1 on its inclusion, if only because it's a fairly simple 9-line function (at least the trivial version I came up with), and n

Re: [Python-Dev] New relative import issue

2006-09-22 Thread Josiah Carlson
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > > At 08:44 PM 9/21/2006 -0700, Josiah Carlson wrote: > >This can be implemented with a fairly simple package registry, contained > >within a (small) SQLite database (which is conveniently shipped in > >

Re: [Python-Dev] New relative import issue

2006-09-21 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > > Guido van Rossum wrote: > > > Eek? If there are two third-party top-level packages A and B, by > > different third parties, and A depends on B, how should A find B if > > not via sys.path or something that is sufficiently equivalent as to > > have the sa

Re: [Python-Dev] list.discard? (Re: dict.discard)

2006-09-21 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > Gustavo Niemeyer wrote: > > > >>> print set.discard.__doc__ > > Remove an element from a set if it is a member. > > Actually I'd like this for lists. Often I find myself > writing > >if x not in somelist: > somelist.remove(x) > > A single me

Re: [Python-Dev] deja-vu .. python locking

2006-09-20 Thread Josiah Carlson
Martin Devera <[EMAIL PROTECTED]> wrote: [snip] > Even if you can do fast atomic inc/dec, it forces cacheline with > refcounter to ping-pong between caches of referencing cpus (for read only > class dicts for example) so that you can probably never get good SMP > scalability. That's ok. Why? Be

Re: [Python-Dev] New relative import issue

2006-09-18 Thread Josiah Carlson
Greg Ewing <[EMAIL PROTECTED]> wrote: > Armin Rigo wrote: > > there > > is no clean way from a test module 'foo.bar.test.test_hello' to import > > 'foo.bar.hello': the top-level directory must first be inserted into > > sys.path magically. > > I've felt for a long time that problems like this > w

Re: [Python-Dev] python, lipo and the future?

2006-09-17 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Out of curiosity: how do the current universal binaries deal with this > issue? If I remember correctly, usually you do two completely independant compile runs (optionally on the same machine with different configure or macro definitions, then use a

Re: [Python-Dev] Signals, threads, blocking C functions

2006-09-12 Thread Josiah Carlson
"Adam Olsen" <[EMAIL PROTECTED]> wrote: > > On 9/12/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > > Adam Olsen wrote: > > > > > That brings you back to how you access the flags variable. > > > > The existing signal handler sets a flag, doesn't it? > > So it couldn't be any more broken than the curr

Re: [Python-Dev] Python 2.4.4 was: Interest in a Python 2.3.6?

2006-09-09 Thread Josiah Carlson
Barry Warsaw <[EMAIL PROTECTED]> wrote: > Well, there certainly hasn't been an overwhelming chorus of support > for the idea, so I think I'll waste my time elsewhere ;). Consider > the offer withdrawn. I hope someone tries to fix one of the two bugs I listed that were problems for 2.3 and 2.

Re: [Python-Dev] What windows tool chain do I need for python 2.5 extensions?

2006-09-08 Thread Josiah Carlson
Barry Scott <[EMAIL PROTECTED]> wrote: > > I have the tool chains to build extensions against your binary python > 2.2, 2.3 and 2.4 on windows. > > What are the tool chain requirements for building extensions against > python 2.5 on windows? The compiler requirements for 2.5 on Windows is t

Re: [Python-Dev] Interest in a Python 2.3.6?

2006-08-29 Thread Josiah Carlson
Barry Warsaw <[EMAIL PROTECTED]> wrote: > I am considering producing a Python 2.3.6 release, which would of > course only be a bug fix maintenance release. The primary reason is > that not all OS distributions have upgraded to Python 2.4 and I think > it's worthwhile for us to bless a relea

Re: [Python-Dev] What should the focus for 2.6 be?

2006-08-21 Thread Josiah Carlson
Talin <[EMAIL PROTECTED]> wrote: [snip] > I've been thinking about the transition to unicode strings, and I want > to put forward a notion that might allow the transition to be done > gradually instead of all at once. > > The idea would be to temporarily introduce a new name for 8-bit strings

Re: [Python-Dev] 2.4 & 2.5 beta 3 crash

2006-08-16 Thread Josiah Carlson
Dino Viehland <[EMAIL PROTECTED]> wrote: > > We've been working on fixing some exception handling bugs in > IronPython where we differ from CPython. Along the way we ran into > this issue which causes CPython to crash when the code below is run. > It crashes on both 2.4 and 2.5 beta 3. The code

<    1   2   3   4   5   6   >