[Python-Dev] Re: [Python-checkins] python/dist/src/Lib whrandom.py, 1.21, NONE

2004-12-04 Thread Tim Peters
[EMAIL PROTECTED] Removed Files: whrandom.py Log Message: Remove the deprecated whrandom module. Woo hoo! It's about friggin' time wink. ___ Python-Dev mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Re: [Python-checkins] python/dist/src/Pythonmarshal.c, 1.79, 1.80

2004-12-20 Thread Tim Peters
[Jeremy Hylton on a quick 2.4.1] Nothing wrong with an incremental release, but none of these sound like critical bugs to me. [Aahz] You don't think a blowup in marshal is critical? Mind expanding on that? [Jeremy] An undocumented extension to marshal causes a segfault. It's certainly a

Re: [Python-Dev] Re: [Python-checkins] python/dist/src/Pythonmarshal.c, 1.79, 1.80

2004-12-21 Thread Tim Peters
[Armin Rigo] Some code in the 'py' lib used to use marshal to send simple objects between the main process and a subprocess. We ran into trouble when we extended the idea to a subprocess that would actually run via ssh on a remote machine, and the remote machine's Python version didn't match

Re: [Python-Dev] Darwin's realloc(...) implementation never shrinks allocations

2005-01-02 Thread Tim Peters
[Bob Ippolito] ... Your expectation is not correct for Darwin's memory allocation scheme. It seems that Darwin creates allocations of immutable size. The only way ANY part of an allocation will ever be used by ANYTHING else is if free() is called with that allocation. Ya, I understood that.

Re: [Python-Dev] Darwin's realloc(...) implementation never shrinks allocations

2005-01-03 Thread Tim Peters
[Tim Peters] Ya, I understood that. My conclusion was that Darwin's realloc() implementation isn't production-quality. So it goes. [Bob Ippolito] Whatever that means. Well, it means what it said. The C standard says nothing about performance metrics of any kind, and a production-quality

Re: [Python-Dev] Re: super() harmful?

2005-01-06 Thread Tim Peters
[Guido] Then why is the title Python's Super Considered Harmful ??? Here's my final offer. Change the title to something like Multiple Inheritance Pitfalls in Python and nobody will get hurt. [Bill Janssen] Or better yet, considering the recent thread on Python marketing, Multiple

Re: [Python-Dev] a bunch of Patch reviews

2005-01-18 Thread Tim Peters
[Martin asks whether Irmen wants to be a tracker admin on SF] [Irmen de Jong] That sounds very convenient, thanks. Does the status of 'python project member' come with certain expectations that must be complied with ? ;-) If you're using Python, you're already required to comply with all of

Re: [Python-Dev] a bunch of Patch reviews

2005-01-20 Thread Tim Peters
[Martin v. Löwis] ... - Add an entry to Misc/NEWS, if there is a new feature, or if it is a bug fix for a maintenance branch (I personally don't list bug fixed in the HEAD revision, but others apparently do) You should. In part this is to comply with license requirements: we're a

Re: [Python-Dev] state of 2.4 final release

2005-01-25 Thread Tim Peters
[Anthony Baxter] I didn't see any replies to the last post, so I'll ask again with a better subject line - as I said last time, as far as I'm aware, I'm not aware of anyone having done a fix for the issue Tim identified ( http://www.python.org/sf/1069160 ) So, my question is: Is this

Re: [Python-Dev] Python Interpreter Thread Safety?

2005-01-28 Thread Tim Peters
... [Evan Jones] What I was trying to ask with my last email was what are the trouble areas? There are probably many that I am unaware of, due to my unfamiliarity the Python internals. Google on Python free threading. That's not meant to be curt, it's just meant to recognize that the task is

Re: [Python-Dev] 2.3.5 and 2.4.1 release plans

2005-02-06 Thread Tim Peters
[Anthony Baxter] Ok, so here's the state of play: 2.3.5 is currently aimed for next Tuesday, but there's an outstanding issue - the new copy code appears to have broken something, see www.python.org/sf/1114776 for the gory details. ... [Alex Martelli] The problem boils down to: deepcopying

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib xmlrpclib.py, 1.38, 1.39

2005-02-10 Thread Tim Peters
[EMAIL PROTECTED] Modified Files: xmlrpclib.py Log Message: accept datetime.datetime instances when marshalling; dateTime.iso8601 elements still unmarshal into xmlrpclib.DateTime objects Index: xmlrpclib.py ... +if datetime and isinstance(value, datetime.datetime): +

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib xmlrpclib.py, 1.38, 1.39

2005-02-10 Thread Tim Peters
[Tim] Fred, is there a reason to avoid datetime.datetime's .isoformat() method here? Like so: Yes. The XML-RPC spec is quite vague. It claims that the dates are in ISO 8601 format, but doesn't say anything more about it. The example shows a string without hyphens (but with colons), so I

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib xmlrpclib.py, 1.38, 1.39

2005-02-10 Thread Tim Peters
[Tim] Well, then since that isn't ISO 8601 format, it would be nice to have a comment explaining why it's claiming to be anyway 0.5 wink. [Fred] Hmm, that's right (ISO 8601:2000, section 5.4.2). Sigh. Ain't your fault. I didn't remember that I had seen the XML-RPC spec before, in

Re: [Python-Dev] ViewCVS on SourceForge is broken

2005-02-11 Thread Tim Peters
[Trent Mick] Has anyone else noticed that viewcvs is broken on SF? It failed the same way from Virginia just now. I suppose that's your reward for kindly updating the Python copyright wink. The good news is that you can use this lull in your Python work to contribute to ZODB development!

Re: [Python-Dev] ViewCVS on SourceForge is broken

2005-02-11 Thread Tim Peters
are currently working on resolving this issue. So that means it wouldn't even do us any good to rename the project to Thomas, Trent, Mick, Tim, Peters, or ZPython either! All right. Heller 2.5, here we come. ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] builtin_id() returns negative numbers

2005-02-14 Thread Tim Peters
[Troels Walsted Hansen] The Python binding in libxml2 uses the following code for __repr__(): class xmlNode(xmlCore): def __init__(self, _obj=None): self._o = None xmlCore.__init__(self, _obj=_obj) def __repr__(self): return xmlNode (%s) object at 0x%x %

Re: [Python-Dev] Re: builtin_id() returns negative numbers

2005-02-15 Thread Tim Peters
[Fredrik Lundh] can anyone explain the struct.pack and ZODB use cases? the first one doesn't make sense to me, Not deep and surely not common, just possible. If you're on a 32-bit box and doing struct.pack(...i..., ... id(obj) ...), it in fact cannot fail now (no, that isn't guaranteed by the

Re: [Python-Dev] pymalloc on 2.1.3

2005-02-15 Thread Tim Peters
[Fredrik Lundh] does anyone remember if there were any big changes in pymalloc between the 2.1 series (where it was introduced) and 2.3 (where it was enabled by default). Yes, huge -- few original lines survived exactly, although many survived in intent. or in other words, is the 2.1.3

Re: [Python-Dev] Memory Allocator Part 2: Did I get it right?

2005-02-15 Thread Tim Peters
[Evan Jones] After I finally understood what thread-safety guarantees the Python memory allocator needs to provide, I went and did some hard thinking about the code this afternoon. I believe that my modifications provide the same guarantees that the original version did. I do need to declare

Re: [Python-Dev] Memory Allocator Part 2: Did I get it right?

2005-02-15 Thread Tim Peters
[Tim Peters] As I said before, I don't think we need to support this any more. More, I think we should not -- the support code is excruciatingly subtle, it wasted plenty of your time trying to keep it working, and if we keep it in it's going to continue to waste time over the coming years

[Python-Dev] 2.4 func.__name__ breakage

2005-02-16 Thread Tim Peters
Rev 2.66 of funcobject.c made func.__name__ writable for the first time. That's great, but the patch also introduced what I'm pretty sure was an unintended incompatibility: after 2.66, func.__name__ was no longer *readable* in restricted execution mode. I can't think of a good reason to

Re: [Python-Dev] 2.4 func.__name__ breakage

2005-02-17 Thread Tim Peters
[Michael Hudson] ... Well, I fixed it on reading the bug report and before getting to python-dev mail :) Sorry if this duplicated your work, but hey, it was only a two line change... Na, the real work was tracking it down in the bowels of Zope's C-coded security machinery -- we'll let you do

Re: [Python-Dev] Re: [ python-Bugs-1124637 ] test_subprocess is far tooslow (fwd)

2005-02-17 Thread Tim Peters
[Fredrik Lundh] does anyone ever use the -u options when running tests? Yes -- I routinely do -uall, under both release and debug builds, but only on Windows. WinXP in particular seems to do a good job when hyper-threading is available -- running the tests doesn't slow down anything else I'm

Re: [Python-Dev] 2.4 func.__name__ breakage

2005-02-17 Thread Tim Peters
[sorry for the near-duplicate msgs -- looks like gmail lied when it claimed the first msg was still in draft status] Did you add a test to ensure this remains fixed? [mwh] Yup. Bless you. Did you attach a contributor agreement and mark the test as being contributed under said contributor

Re: [Python-Dev] Windows Low Fragementation Heap yields speedup of ~15%

2005-02-17 Thread Tim Peters
, so I can only speculate - do the lists at some point grow beyond the upper limit of obmalloc, but are handled by the LFH (which has a higher upper limit, if I understood Tim Peters correctly)? A Python list object comprises two separately allocated pieces of memory. First is a list header

Re: [Python-Dev] Windows Low Fragementation Heap yields speedup of ~15%

2005-02-18 Thread Tim Peters
[Tim Peters] ... Then you allocate a small object, marked 's': bbbsfff [Evan Jones] Isn't the whole point of obmalloc No, because it doesn't matter what follows that introduction: obmalloc has several points, including exploiting the GIL, heuristics

Re: [Python-Dev] Re: Re: Re: Prospective Peephole Transformation

2005-02-18 Thread Tim Peters
[Phillip J. Eby] Still, it's rather interesting that tuple.__contains__ appears slower than a series of LOAD_CONST and == operations, considering that the tuple should be doing basically the same thing, only without bytecode fetch-and- decode overhead. Maybe it's tuple.__contains__ that needs

Re: [Python-Dev] Prospective Peephole Transformation

2005-02-18 Thread Tim Peters
[Raymond Hettinger] ... The problem with the transformation was that it didn't handle the case where x was non-hashable and it would raise a TypeError instead of returning False as it should. I'm very glad you introduced the optimization of building small constant tuples at compile-time.

Re: [Python-Dev] Windows Low Fragementation Heap yields speedup of ~15%

2005-02-18 Thread Tim Peters
[Tim Peters] grow the list to its final size once, at the start (overestimating if you don't know for sure). Then instead of appending, keep an index to the next free slot, same as you'd do in C. Then the list guts never move, so if that doesn't yield the same kind of speedup without using

[Python-Dev] Useful thread project for 2.5?

2005-03-04 Thread Tim Peters
Florent Guillaume recently wrote a valuable addin for Zope: http://www.zope.org/Members/nuxeo/Products/DeadlockDebugger When a Zope has threads that are hung, this can give a report of Python's current state (stack trace) across all threads -- even the ones that are hung (the deadlocked

Re: [Python-Dev] Useful thread project for 2.5?

2005-03-06 Thread Tim Peters
[Phillip J. Eby] What would you suggest calling it? sys._current_frames(), returning a dictionary? I don't fight about names -- anything that doesn't make Guido puke works wink. I channel that sys._current_frames() would be fine. A dict mapping thread id to current thread frame would be

Re: [Python-Dev] Re: Useful thread project for 2.5?

2005-03-07 Thread Tim Peters
[Greg Ward] What would be *really* spiffy is to provide a way for externally-triggered thread dumps. This is one of my top two Java features [1]. The way this works in Java is a bit awkward -- kill -QUIT the Java process and it writes a traceback for every running thread to stdout -- but it

[Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
I don't know how far I'll get with this. Using the current Zope-2_7-branch of the Zope module at cvs.zope.org:/cvs-repository, building Zope via python setup.py build_ext -i worked fine when I got up today, using the released Python 2.4. One of its tests fails, because of a Python bug that

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
[Anthony Baxter] It works on Linux, with Zope 2.7.4. Thanks! Just as a note to others (I've mentioned this to Tim already) if you set an environment variable DISTUTILS_DEBUG before running a setup.py, you get very verbose information about what's going on, and, more importantly, full

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
This is going to need someone who understands distutils internals. The strings we end up passing to putenv() grow absurdly large, and sooner or later Windows gets very unhappy with them. os.py has a elif name in ('os2', 'nt'): # Where Env Var Names Must Be UPPERCASE class controlling

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
[ A.M. Kuchling] In distutils.msvccompiler: def __init__ (self, verbose=0, dry_run=0, force=0): ... self.initialized = False def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None,

Re: [Python-Dev] RELEASED Python 2.4.1, release candidate 1

2005-03-10 Thread Tim Peters
[Martin v. Löwis] I'd like to encourage feedback on whether the Windows installer works for people. It replaces the VBScript part in the MSI package with native code, which ought to drop the dependency on VBScript, but might introduce new incompatibilities. Worked fine here. Did an

Re: [Python-Dev] distutils fix for building Zope against Python 2.4.1c1

2005-03-11 Thread Tim Peters
[Trent Mick] Investigation has turned up that I cannot keep my Python trees straight. That patch *does* fix building PyWin32 against 2.4.1c1. Good! Please send a check for US$1000.00 to the PSF by Monday wink. ___ Python-Dev mailing list

Re: [Python-Dev] sum()

2005-03-11 Thread Tim Peters
FYI, there are a lot of ways to do accurate fp summation, but in general people worry about it too much (except for those who don't worry about it at all -- they're _really_ in trouble 0.5 wink). One clever way is to build on that whenever |x| and |y| are within a factor of 2 of each other, x+y

Re: [Python-Dev] sum()

2005-03-12 Thread Tim Peters
[Raymond Hettinger] Computing an error term can get the bit back and putting that term back in the input queue restores the overall sum. Right! Once the inputs are exhausted, the components of exp2sum should be exact. Ditto. I'll cover some subtleties below: from math import frexp from

Re: [Python-Dev] Re: distutils fix for building Zope against Python 2.4.1c1

2005-03-12 Thread Tim Peters
[Tim] Don't think it's needed on HEAD. As the checkin comment said: This doesn't appear to be an issue on the HEAD (MSVCCompiler initializes itself via __init__() on the HEAD). I verified by building Zope with unaltered HEAD too, and had no problem with that. [Martin] Are you

Re: [Python-Dev] Open issues for 2.4.1

2005-03-12 Thread Tim Peters
[Anthony Baxter] So here's a list of open items I'm thinking about for the 2.4.1 release. [... sorry, but my editor automatically deletes all paragraphs mentioning problems with Unicode ...] - The unitest changesChanges to unitest to fix subclassing broke Zope's unittests.

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-15 Thread Tim Peters
[Guido van Rossum] Um, Python doesn't provide a lot of special support for numbers apart from literals -- sum() should support everything that supports the + operator, just like min() and max() support everything that supports comparison, etc. The discussion in the patch that introduced it

Re: [Python-Dev] Rationale for sum()'s design?

2005-03-15 Thread Tim Peters
[Alex Martelli] I'm reasonably often using sum on lists of datetime.timedelta instances, durations, which ARE summable just like numbers even though they aren't numbers. I believe everything else for which I've used sum in production code DOES come under the general concept of numbers, in

Re: [Python-Dev] Problems with definition of _POSIX_C_SOURCE

2005-03-16 Thread Tim Peters
[Jack Jansen] On a platform I won't mention here I'm running into problems compiling Python, because of it defining _POSIX_C_SOURCE. ... Does anyone know what the real meaning of this define is? LOL. Here's the Official Story:

Re: [Python-Dev] thread semantics for file objects

2005-03-17 Thread Tim Peters
[Jeremy Hylton] ... Universal newline reads and get_line() both lock the stream if the platform supports it. So I expect that they are atomic on those platforms. Well, certainly not get_line(). That locks and unlocks the stream _inside_ an enclosing for-loop. Looks quite possible for

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Tim Peters
[Brett C.] Make sure AST is used in the subject line; e.g., [AST] at the beginning. Unfortunately the AST group is only available for patches; not listed for bug reports (don't know why; can this be fixed?). Your wish is my command: there's an AST group in Python's bug tracker now. FYI, each

Re: [Python-Dev] longobject.c ob_size

2005-04-05 Thread Tim Peters
[Michael Hudson] Asking mostly for curiousity, how hard would it be to have longs store their sign bit somewhere less aggravating? Depends on where that is. It seems to me that the top bit of ob_digit[0] is always 0, for example, Yes, the top bit of ob_digit[i], for all relevant i, is 0 on

[Python-Dev] Re: [Python-checkins] python/dist/src/Modules mathmodule.c, 2.74, 2.75

2005-04-06 Thread Tim Peters
[EMAIL PROTECTED] Modified Files: mathmodule.c Log Message: Add a comment explaining the import of longintrepr.h. Index: mathmodule.c ... #include Python.h -#include longintrepr.h +#include longintrepr.h // just for SHIFT The intent is fine, but please use a standard C (not C++)

Re: [Python-Dev] threading (GilState) question

2005-04-07 Thread Tim Peters
[Michael Hudson] ... Point the first is that I really think this is a bug in the GilState APIs: the readline API isn't inherently multi-threaded and so it would be insane to call PyEval_InitThreads() in initreadline, yet it has to cope with being called in a multithreaded situation. If you

Re: [Python-Dev] marshal / unmarshal

2005-04-08 Thread Tim Peters
[Scott David Daniels] What should marshal / unmarshal do with floating point NaNs (the case we are worrying about is Infinity) ? The current behavior is not perfect. All Python behavior in the presence of a NaN, infinity, or signed zero is a platform-dependent accident. This is because C89

Re: [Python-Dev] Re: marshal / unmarshal

2005-04-10 Thread Tim Peters
marshal shouldn't be representing doubles as decimal strings to begin with. All code for (de)serialing C doubles should go thru _PyFloat_Pack8() and _PyFloat_Unpack8(). cPickle (proto = 1) and struct (std mode) already do; marshal is the oddball. But as the docs (floatobject.h) for these say:

Re: [Python-Dev] Re: marshal / unmarshal

2005-04-10 Thread Tim Peters
[mwh] OTOH, the implementation has this comment: /* * _PyFloat_{Pack,Unpack}{4,8}. See floatobject.h. * * TODO: On platforms that use the standard IEEE-754 single and double * formats natively, these routines

Re: [Python-Dev] Re: marshal / unmarshal

2005-04-11 Thread Tim Peters
[Tim] The 754 standard doesn't say anything about how the difference between signaling and quiet NaNs is represented. So it's possible that a qNaN on one box would look like an sNaN on a different box, and vice versa. But since most people run with all FPU traps disabled, and Python doesn't

Re: [Python-Dev] Re: marshal / unmarshal

2005-04-11 Thread Tim Peters
... [mwh] OK, so the worst that could happen here is that moving marshal data from one box to another could turn one sort of NaN into another? Right. Assuming source and destination boxes both use 754 format, and the implementation adjusts endianess if necessary. Heh. I have a vague

Re: [Python-Dev] Re: marshal / unmarshal

2005-04-11 Thread Tim Peters
[Michael Hudson] I've just submitted http://python.org/sf/1180995 which adds format codes for binary marshalling of floats if version 1, but it doesn't quite have the effect I expected (see below): inf = 1e308*1e308 nan = inf/inf marshal.dumps(nan, 2) Traceback (most recent call last):

Re: [Python-Dev] Re: marshal / unmarshal

2005-04-12 Thread Tim Peters
... [mwh] I recall stories of machines that stored the bytes of long in some crazy order like that. I think Python would already be broken on such a system, but, also, don't care. [Tim] Python does very little that depends on internal native byte order, and C hides it in the absence of

[Python-Dev] Newish test failures

2005-04-20 Thread Tim Peters
Seeing three seemingly related test failures today, on CVS HEAD: test_csv test test_csv failed -- errors occurred; run in verbose mode for details test_descr test test_descr crashed -- exceptions.AttributeError: attribute '__dict__' of 'type' objects is not writable test_file test test_file

Re: [Python-Dev] PEP 340 -- concept clarification

2005-05-03 Thread Tim Peters
[Tim] Because Queue does use condvars now instead of plain locks, I wouldn't approve of any gimmick purporting to hide the acquire/release's in put() or get(): that those are visible is necessary to seeing that the _condvar_ protocol is being followed (must acquire() before wait(); must be

Re: [Python-Dev] Pre-PEP: Unifying try-except and try-finally

2005-05-04 Thread Tim Peters
[Guido] I'm +1 on accepting this now -- anybody against? I'm curious to know if you (Guido) remember why you removed this feature in Python 0.9.6? From the HISTORY file: New features in 0.9.6: - stricter try stmt syntax: cannot mix except and finally clauses on 1 try IIRC (and I may well

Re: [Python-Dev] Pre-PEP: Unifying try-except and try-finally

2005-05-04 Thread Tim Peters
[Shane Holloway] And per the PEP, I think the explaining that:: try: A except: B else: C finally: D is *exactly* equivalent to:: try: try: A except: B else: C

Re: [Python-Dev] PEP 340 - Remaining issues - keyword

2005-05-06 Thread Tim Peters
[Guido] ... I wonder how many folks call their action methods do() though. A little Google(tm)-ing suggests it's not all that common, although it would break Zope on NetBSD: http://www.zope.org/Members/tino/ZopeNetBSD I can live with that wink.

Re: [Python-Dev] Tidier Exceptions

2005-05-13 Thread Tim Peters
[Guido, on string exceptions] ... Last I looked Zope 2 still depended on them (especially in the bowels of ZODB); maybe Tim Peters knows if that's still the case. Certainly none of that in ZODB, or in ZRS. Definitely some in Zope 2.6: http://mail.zope.org/pipermail/zope-tests/2005-May

Re: [Python-Dev] [Python-checkins] python/nondist/peps pep-0343.txt, 1.11, 1.12

2005-05-17 Thread Tim Peters
[Raymond Hettinger] ... One more change: The final return +s should be unindented. It should be at the same level as the do with_extra_precision(). The purpose of the +s is to force the result to be rounded back to the *original* precision. This nuance is likely to be the bane of folks

Re: [Python-Dev] Combining the best of PEP 288 and PEP 325: generator exceptions and cleanup

2005-05-19 Thread Tim Peters
[Guido] ... I think in the past I've unsuccessfully tried to argue that if a cycle contains exactly one object with a Python-invoking finalizer, that finalizer could be invoked before breaking the cycle. I still think that's a sensible proposal, and generators may be the use case to finally

Re: [Python-Dev] Combining the best of PEP 288 and PEP 325: generator exceptions and cleanup

2005-05-19 Thread Tim Peters
[Phillip J. Eby] ... However, Tim's new post brings up a different issue: if the collector can't tell the difference between a cycle participant and an object that's only reachable from a cycle, then the mere existence of a generator __del__ will prevent the cycle collection of the entire

Re: [Python-Dev] Combining the best of PEP 288 and PEP 325: generator exceptions and cleanup

2005-05-19 Thread Tim Peters
[Phillip J. Eby] Now you've shaken my faith in Uncle Timmy. :) Now, now, a mere technical matter is no cause for soul-damning heresy! Seriously, he did *say*: For example, it doesn't know the difference between an object that's in a trash cycle, and an object that's not in a trash cycle

Re: [Python-Dev] Adventures with Decimal

2005-05-19 Thread Tim Peters
[Raymond Hettinger] For brevity, the above example used the context free constructor, but the point was to show the consequence of a precision change. Yes, I understood your point. I was making a different point: changing precision isn't needed _at all_ to get surprises from a constructor

Re: [Python-Dev] Adventures with Decimal

2005-05-19 Thread Tim Peters
Sorry, I simply can't make more time for this. Shotgun mode: [Raymond] I have no such thoughts but do strongly prefer the current design. How can you strongly prefer it? You asked me whether I typed floats with more than 28 significant digits. Not usually wink. Do you? If you don't

Re: [Python-Dev] [Python-checkins] python/nondist/peps pep-0343.txt, 1.11, 1.12

2005-05-19 Thread Tim Peters
[Greg Ewing] I don't see it's because of that. Even if D(whatever) didn't ignore the context settings, you'd get the same oddity if the numbers came from somewhere else with a different precision. Most users don't change context precision, and in that case there is no operation defined in the

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Tim Peters
[Michael Chermside] Tim, I find Raymond's arguments to be much more persuasive. (And that's even BEFORE I read his 11-point missive.) I understood the concept that *operations* are context- dependent, but decimal *objects* are not, and thus it made sense to me that *constructors* were not

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Tim Peters
[Raymond Hettinger] The word deviate inaccurately suggests that we do not have a compliant method which, of course, we do. There are two methods, one context aware and the other context free. The proposal is to change the behavior of the context free version, treat it as a bug, and alter it

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Tim Peters
[Guido] It looks like if you pass in a context, the Decimal constructor still ignores that context: import decimal as d d.getcontext().prec = 4 d.Decimal(1.234567890123456789012345678901234567890123456789, d.getcontext())

Re: [Python-Dev] Vestigial code in threadmodule?

2005-06-02 Thread Tim Peters
[A.M. Kuchling] Looking at bug #1209880, the following function from threadmodule.c is referenced. I think the args==NULL case, which can return None instead of a Boolean value, can never be reached because PyArg_ParseTuple() will fail if args==NULL. It would assert-fail in a debug build.

Re: [Python-Dev] Propose to reject PEP 336 -- Make None Callable

2005-06-17 Thread Tim Peters
[Raymond Hettinger] After nine months, no support has grown beyond the original poster. Never will, either -- even Roman numeral literals are more Pythonic than this one. More Pythonic: make integers callable: i(arglist) returns the i'th argument. So, e.g., people who find it inconvenient to

Re: [Python-Dev] Propose rejection of PEP 303 -- Extend divmod() for Multiple Divisors

2005-06-17 Thread Tim Peters
About PEP 303, I use divmod for lots (and lots) of things, but I've got no real use for an extended divmod() either. -1: it would be low-use, confusing clutter. [Barry] Interesting. Just yesterday I wrote a simple stopwatch-like timer script and I found that I needed three divmod calls to

Re: [Python-Dev] is type a usable feature?

2005-06-23 Thread Tim Peters
[Paolino [EMAIL PROTECTED]] Hello developers,I noticed my application was growing strangely while I was using type, then I tried this: while True: type('A',(),{}) and saw memory filling up.Is there a clean solution to that? I see it as a bug in python engeneering,that is why I wrote to

Re: [Python-Dev] refcounting vs PyModule_AddObject

2005-06-23 Thread Tim Peters
[Michael Hudson] I've been looking at this area partly to try and understand this bug: [ 1163563 ] Sub threads execute in restricted mode but I'm not sure the whole idea of multiple interpreters isn't inherently doomed :-/ [Martin v. Löwis] That's what Tim asserts, saying that people

Re: [Python-Dev] [Python-checkins] python/dist/src/Lib Cookie.py, 1.17, 1.18

2005-06-26 Thread Tim Peters
[EMAIL PROTECTED] Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4891/Lib Modified Files: Cookie.py Log Message: bug [ 1108948 ] Cookie.py produces invalid code Index: Cookie.py

Re: [Python-Dev] List copy and clear (was Re: Inconsistent API forsets.Set and build-in set)

2005-07-07 Thread Tim Peters
[Tim Peters] Or my personal favorite, while mylist: del mylist[::2] Then the original index positions with the most consecutive trailing 1 bits survive the longest, which is important to avoid ZODB cache bugs wink. [Christos Georgiou] This is a joke, hopefully, and in that case

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-07 Thread Tim Peters
[Guido, on {for,while}/else] ... The question remains whether Python would be easier to learn without them. And if so, the question would remain whether that's offset by their utility for experienced developers. All hard to assess impartially! That's what I'm here for. I like loop else

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-07 Thread Tim Peters
[Guido] OTOH I don't particularly like code that requires flag variables; Me neither; that's indeed why this one isn't a slam dunk. they often make me squirm because the same condition (flag) is tested multiple times where it could be tested just once if more sophisticated flow control (e.g.

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-07 Thread Tim Peters
[Jeremy Hylton] ... PS Every time I switch between Python and C, I get confused about elif and else if. Mostly goes to show that you don't use Perl much ;-) Of course, in C99, #define elif else if is part of stdlib.h. Or maybe it isn't, and it just should have been? One of those -- or

Re: [Python-Dev] Linux Python linking with G++?

2005-07-11 Thread Tim Peters
[Michael Hudson] --with-fpectl, for example. Does anyone lurking here actually use that, know what it does and require the functionality? Inquiring minds want to know. I know what it intends to do: fpectlmodule.c intends to enable the HW FPU divide-by-0, overflow, and invalid operation

Re: [Python-Dev] should doc string content == documentation content?

2005-07-24 Thread Tim Peters
[Skip] There's a new bug report on SF (#1243553) complaining (that's probably not the right word) that the documentation for cgi.escape available from pydoc isn't as detailed as that in the full documentation. Is there any desire to make the runtime documentation available via pydoc or help()

Re: [Python-Dev] should doc string content == documentation content?

2005-07-24 Thread Tim Peters
[Tim Lesher] While I agree that docstrings shouldn't be a deep copy of _Python in a Nutshell_, there are definitely some areas of the standard library that could use some help. threading comes to mind immediately. Sure! The way to cure that one is to write better docstrings for threading --

Re: [Python-Dev] zlib 1.2.3 is just out

2005-07-25 Thread Tim Peters
[Scott David Daniels] I'd guess this belongs in 2.5, with a possible retrofit for 2.4. [Raymond Hettinger] +1 on backporting, but that is up to Anthony. [Martin v. L?wis wrote] Correct me if I'm wrong - but there isn't much porting to this. AFAICT, this is only relevant for the Windows build

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-07-28 Thread Tim Peters
[Martin v. Löwis] I'd like to see the Python source be stored in Subversion instead of CVS, and on python.org instead of sf.net. To facilitate discussion, I have drafted a PEP describing the rationale for doing so, and the technical procedure to be performed. This is for discussion on

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-07-28 Thread Tim Peters
[Jeff Rush] The conversion script isn't perfect and does fail on complex CVS arrangements or where there is extensive history to migate. However it appears above that Martin has already tried the script out, with success. I'd still like to hear from Jim, as I don't believe all serious

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-07-28 Thread Tim Peters
[Tim] Ah, before I forget, single repository has worked very well for Zope (which includes top-level Zope2, Zope3, ZODB, ZConfig, zdaemon, ... projects): http://svn.zope.org/ Long URLs don't really get in the way in practice (rarely a need to type one after initial checkout; even svn

Re: [Python-Dev] math.fabs redundant?

2005-07-29 Thread Tim Peters
[Skip] Why does math have an fabs function? Both it and the abs builtin function wind up calling fabs() for floats. abs() is faster to boot. Nothing deep -- the math module supplies everything in C89's standard libm (+ a few extensions), fabs() is a std C89 libm function. There isn't a clear

Re: [Python-Dev] FW: PEP 8: exception style

2005-08-06 Thread Tim Peters
[AMK] PEP 8 doesn't express any preference between the two forms of raise statements: raise ValueError, 'blah' raise ValueError(blah) I like the second form better, because if the exception arguments are long or include string formatting, you don't need to use line continuation characters

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-08-08 Thread Tim Peters
[Trent Mick] ... There are other little things, like not being able to trim the check-in filelist when editing the check-in message. For example, say you have 10 files checked out scattered around the Python source tree and you want to check 9 of those in. This seems dubious, since you're

Re: [Python-Dev] __traceback__ and reference cycles

2005-08-08 Thread Tim Peters
[Armin Rigo] There are various proposals to add an attribute on exception instances to store the traceback (see PEP 344). A detail not discussed, which I thought of historical interest only, is that today's exceptions try very hard to avoid reference cycles, in particular the cycle 'frame

Re: [Python-Dev] __traceback__ and reference cycles

2005-08-08 Thread Tim Peters
[Tim Peters] If P3K retains them [__del__]-- or maybe even before --we should consider taking the Java dodge on this one. That is, decree that henceforth a __del__ method will get invoked by magic at most once on any given object O, no matter how often O is resurrected. [Phillip J. Eby] How

Re: [Python-Dev] __traceback__ and reference cycles

2005-08-08 Thread Tim Peters
[Brett Cannon] Wasn't there talk of getting rid of __del__ a little while ago and instead use weakrefs to functions to handle cleaning up? There was from me, yes, with an eye toward P3K. Is that still feasible? It never was, really. The combination of finalizers, cycles and resurrection is

Re: [Python-Dev] Sourceforge CVS down?

2005-08-09 Thread Tim Peters
[Neil Schemenauer[ I've been getting: ssh: connect to host cvs.sourceforge.net port 22: Connection refused for the past few hours. Their Site News doesn't say anything about downtime. A cvs update doesn't work for me either now. I did finish one sometime before noon (EDT) today,

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-15 Thread Tim Peters
[Martin v. Löwis] I have placed a new version of the PEP on http://www.python.org/peps/pep-0347.html ... +1 from me. But, I don't think my vote should count much, and (sorry) Guido's even less: what do the people who frequently check in want? That means people like you (Martin), Michael,

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-16 Thread Tim Peters
[Michael Hudson] I suppose another question is: when? Between 2.4.2 and 2.5a1 seems like a good opportunity. I guess the biggest job is collection of keys and associated admin? [Martin v. Löwis] I would agree. However, there still is the debate of hosting the repository elsehwere. Some

  1   2   3   4   5   6   7   8   9   10   >