Re: [Python-Dev] Import hooks falling back on built-in import machinery?

2006-05-25 Thread Georg Brandl
Guido van Rossum wrote: > Good catch. I think this would save a certain number of unnecessary > stat() calls. > > But it does change semantics, so we can't fix this in 2.4. In 2.5, we > should warn hook authors that this might affect them. > > The PEP ought to be updated to clarify this. Okay. T

Re: [Python-Dev] A Horrible Inconsistency

2006-05-25 Thread Georg Brandl
Martin v. Löwis wrote: > Fredrik Lundh wrote: >> >>> -1 * (1, 2, 3) >> () >> >>> -(1, 2, 3) >> Traceback (most recent call last): >>File "", line 1, in >> TypeError: bad operand type for unary - >> >> We Really Need To Fix This! > > I can't find this inconsistency horrible. > > py> +"Hell

Re: [Python-Dev] A Horrible Inconsistency

2006-05-25 Thread Georg Brandl
Tim Peters wrote: > [Raymond Hettinger] > ... >> Also, I'm not clear on the rationale for transforming negative >> repetition counts to zero instead of raising an exception. > > There are natural use cases. Here's one: you have a string and want > to right-justify it to 80 columns with blanks if

Re: [Python-Dev] A Horrible Inconsistency

2006-05-25 Thread Georg Brandl
Georg Brandl wrote: > Martin v. Löwis wrote: >> Fredrik Lundh wrote: >>> >>> -1 * (1, 2, 3) >>> () >>> >>> -(1, 2, 3) >>> Traceback (most recent call last): >>>File "", line 1, in >>> TypeError:

[Python-Dev] Request for patch review

2006-05-26 Thread Georg Brandl
I've worked on two patches for NeedForSpeed, and would like someone familiar with the areas they touch to review them before I check them in, breaking all the buildbots which aren't broken yet ;) They are: http://python.org/sf/1346214 Better dead code elimination for the AST compiler http://

Re: [Python-Dev] A Horrible Inconsistency

2006-05-26 Thread Georg Brandl
Facundo Batista wrote: > 2006/5/26, Sean Reifschneider <[EMAIL PROTECTED]>: > >> On Fri, May 26, 2006 at 12:37:02PM -0300, Facundo Batista wrote: >> >- Treat the negative as a reverser, so we get back (3, 2, 1). >> >> Then we could get: >> >>>>> print -123 >>321 > > An integer is NOT a se

Re: [Python-Dev] A Horrible Inconsistency

2006-05-26 Thread Georg Brandl
Fredrik Lundh wrote: > Sean Reifschneider wrote: > >>> - Treat the negative as a reverser, so we get back (3, 2, 1). >> >> Then we could get: >> >>>>> print -123 >>321 >> >> Yay! > > and while we're at it, let's fix this: > > >>> 0.66 * (1, 2, 3) > (1, 2) > > and maybe even

[Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Georg Brandl
In the process of reviewing and possibly extending getargs.c, I stumbled over the "compatibility" flag supposedly used for METH_OLDARGS functions. No code in the core uses this calling convention any more, and it has been deprecated for quite a long time (since 2.2), so would it be appropriate to e

Re: [Python-Dev] [Python-checkins] Python Regression Test Failures refleak (101)

2006-05-28 Thread Georg Brandl
Michael Hudson wrote: > So I think I'll be reading through exceptions.c pretty carefully. I > don't think Sean and Richard have acquired as much paranoid > anal-mindedness and I have when hacking on Python C internals yet :) I intended to go through the code again today or tomorrow, looking for

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Georg Brandl
Neal Norwitz wrote: > On 5/28/06, Georg Brandl <[EMAIL PROTECTED]> wrote: >> In the process of reviewing and possibly extending getargs.c, I stumbled >> over the "compatibility" flag supposedly used for METH_OLDARGS functions. >> No code in the core uses thi

Re: [Python-Dev] [Python-checkins] Python Regression Test Failures refleak (101)

2006-05-28 Thread Georg Brandl
Michael Hudson wrote: > Georg Brandl <[EMAIL PROTECTED]> writes: > >> Michael Hudson wrote: >> >>> So I think I'll be reading through exceptions.c pretty carefully. I >>> don't think Sean and Richard have acquired as much paranoid >>>

Re: [Python-Dev] [Python-checkins] Python Regression Test Failures refleak (101)

2006-05-28 Thread Georg Brandl
Michael Hudson wrote: > Michael Hudson <[EMAIL PROTECTED]> writes: > >> I think I've fixed the refleaks too, but running regrtest -R :: takes >> rther a while. > > I hadn't: test_codecs and test_codeccallbacks both leak, the latter > quite spectacularly (9000+ refleaks a run). The test_codec

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Georg Brandl
Neal Norwitz wrote: >> These modules can be converted. > > We can convert the one's in Python, but not the third party ones. > It's also very difficult to search for something that's not there. > You need to review every PyMethodDef entry to verify it has a METH_* > flag. These implicit METH_OLD

Re: [Python-Dev] feature request: inspect.isgenerator

2006-05-29 Thread Georg Brandl
Fredrik Lundh wrote: > Terry Reedy wrote: > >>> def isgenerator(func): >>>return func.func_code.co_flags == 99 >>> >>> but it is rather ugly (horrible indeed). >> >> To me, part of the beauty of Python is that is so easy to write such things >> so compactly, so that we do not need megaAPIs w

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Georg Brandl
Thomas Wouters wrote: > > On 5/29/06, *Fredrik Lundh* <[EMAIL PROTECTED] > > wrote: > > > this is a clear case of unnecessary meddling. removing it won't remove > much code (a whopping 11 lines is dedicated to this), nor give any speed > ups whatsoever; all

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Georg Brandl
Martin v. Löwis wrote: > Georg Brandl wrote: >> Isn't there at least a GCC __attribute__((deprecated))? > > Yes, but it applies to functions only. I guess you could make > a __deprecated__ function, and then expand METH_OLDARGS to a > call of that function. That won&#

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Georg Brandl
Martin v. Löwis wrote: > Guido van Rossum wrote: >>> I think that should be done for 2.5, but nothing else. Or, perhaps >>> a deprecation warning could be generated if it is still used. >> >> I'll let Martin decide this one. > > I just sent a message to some that producing a DeprecationWarning is

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Georg Brandl
Neal Norwitz wrote: > On 5/29/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> >> > OTOH, perhaps a deprecation warning on PyArgs_Parse() is sufficient? >> > What about that? It doesn't address other cases where OLDARGS are >> > used without PyArgs_Parse though. >> >> What other cases remain? P

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Georg Brandl
Fredrik Lundh wrote: > Georg Brandl wrote: > >> > I'd be satisfied with a deprecation warning for PyArg_Parse, though we >> > (*) should really figure out how to make it work on Windows. I >> > haven't seen anyone object to the C compiler deprecation w

Re: [Python-Dev] A can of worms... (does Python C code have a new C style?)

2006-05-31 Thread Georg Brandl
Martin Blais wrote: > Hi all > > I'd like to know what the policy is on the source code indentation for > C code in the interpreter. At the Need-for-Speed sprints, there was > consensus that there is a "new" indentation for style for the Python C > source files, with > > * indentation (emacs: c-

[Python-Dev] Arguments and PyInt_AsLong

2006-05-31 Thread Georg Brandl
Looking at #1153226, I found this: We introduced emitting a DeprecationWarning for PyArg_ParseTuple integer arguments if a float was given. This doesn't affect functions like file.seek which use PyInt_AsLong to parse their argument. PyInt_AsLong calls the nb_int slot which silently converts floats

Re: [Python-Dev] feature request: inspect.isgenerator

2006-06-01 Thread Georg Brandl
Michele Simionato wrote: > Neal Norwitz gmail.com> writes: >> >> > I wonder whether a check shouldn't just return (co_flags & 0x20), which >> > is CO_GENERATOR. >> >> Makes more sense. > > Okay, but my point is that the final user should not be expected to know > about those implementation deta

Re: [Python-Dev] feature request: inspect.isgenerator

2006-06-01 Thread Georg Brandl
Michele Simionato wrote: > Georg Brandl gmx.net> writes: > >> I'd say, go ahead and write a patch including docs, and I think there's no >> problem with accepting it (as long as it comes before beta1). > > I was having a look at http://docs.python.org/dev/

Re: [Python-Dev] feature request: inspect.isgenerator

2006-06-01 Thread Georg Brandl
Michele Simionato wrote: > Georg Brandl gmx.net> writes: >> >> > Also, should one add >> > a GeneratorType, perhaps as a subclass of FunctionType? >> >> Add GeneratorType where? There is already one in the types module. > > Yep, this is the crux.

[Python-Dev] S/390 buildbot URLs problematic

2006-06-01 Thread Georg Brandl
The S/390 buildbot should be renamed. While the URLs buildbot generates in its email messages work, the ones that are on the overview page don't. Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] SF patch #1473257: "Add a gi_code attr to generators"

2006-06-01 Thread Georg Brandl
Phillip J. Eby wrote: > At 09:53 PM 5/31/2006 +0200, Collin Winter wrote: >>Hi Phillip, >> >>Do you have any opinion on this patch (http://python.org/sf/1473257), >>which is assigned to you? > > I didn't know it was assigned to me. I guess SF doesn't send any > notifications, and neither did Geo

Re: [Python-Dev] Unhashable objects and __contains__()

2006-06-03 Thread Georg Brandl
Collin Winter wrote: > I recently submitted a patch that would optimise "in (5, 6, 7)" (ie, > "in" ops on constant tuples) to "in frozenset([5, 6, 7])". Raymond > Hettinger rejected (rightly) the patch since it's not semantically > consistent. Quoth: > >>> Sorry, this enticing idea has already bee

Re: [Python-Dev] Request for patch review

2006-06-03 Thread Georg Brandl
Georg Brandl wrote: > I've worked on two patches for NeedForSpeed, and would like someone > familiar with the areas they touch to review them before I check them > in, breaking all the buildbots which aren't broken yet ;) > > They are: > > http://python.org/sf

Re: [Python-Dev] Unhashable objects and __contains__()

2006-06-04 Thread Georg Brandl
Collin Winter wrote: > On 6/4/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> On 6/3/06, Georg Brandl <[EMAIL PROTECTED]> wrote: >> > Collin Winter wrote: >> > > Idea: what if Python's -O option caused PySequence_Contains() to >> > >

Re: [Python-Dev] Stdlib Logging questions (PEP 337 SoC)

2006-06-06 Thread Georg Brandl
Jim Jewett wrote: > Jackilyn is adding logging to several stdlib modules for the Google > Summer of Code (PEP 337), and asked me to review her first few > changes. A related question: Will your student try to resolve the issues on SF referring to logging, or is that not part of the project? There

Re: [Python-Dev] Python Benchmarks

2006-06-08 Thread Georg Brandl
Thomas Wouters wrote: > > > On 6/8/06, *M.-A. Lemburg* <[EMAIL PROTECTED] > > wrote: > > Perhaps it's a new feature in gcc 4.0 that makes the slow-down I see > turn into a speedup :-) > > > It seems so. I tested with gcc 2.95, 3.3 and 4.0 on FreeBSD 4.10 (onl

Re: [Python-Dev] zlib module doesn't build - inflateCopy() not found

2006-06-08 Thread Georg Brandl
Chris AtLee wrote: > On 5/21/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> Then options 2 and 3 are both fine. >> >> Not compiling at all is *not*, so if nobody has time to implement 2 or >> 3, we'll have to do 4. >> >> --Guido > > Is this thread still alive? At least I still have this on my

Re: [Python-Dev] 2.5 issues need resolving in a few days

2006-06-09 Thread Georg Brandl
Paul Moore wrote: > On 6/9/06, Aahz <[EMAIL PROTECTED]> wrote: >> There was also discussion of a change to the way "quit" works in >> interactive mode. I see no record of it, so I guess that's not going in, >> either. > > It's already in 2.5a2, if I'm thinking of the same thing you are... > Paul.

Re: [Python-Dev] Segmentation fault in collections.defaultdict

2006-06-10 Thread Georg Brandl
Nick Coghlan wrote: > Kevin Jacobs <[EMAIL PROTECTED]> wrote: >> Try this at home: >> import collections >> d=collections.defaultdict(int) >> d.iterkeys().next() # Seg fault >> d.iteritems().next() # Seg fault >> d.itervalues().next() # Fine and dandy > > This all worked fine for me in rev 46739

Re: [Python-Dev] file()

2006-06-12 Thread Georg Brandl
Guido van Rossum wrote: > Yup, although it's a change in behavior that would need to be studied > carefully for backwards incompatibilities. Usually it's given as a > constant, so there won't be any problems; but there might be code that > receives a mode string and attempts to test its validity by

Re: [Python-Dev] file()

2006-06-12 Thread Georg Brandl
Guido van Rossum wrote: > On 6/12/06, Georg Brandl <[EMAIL PROTECTED]> wrote: >> Guido van Rossum wrote: >> > Yup, although it's a change in behavior that would need to be studied >> > carefully for backwards incompatibilities. Usually it's given as a &g

[Python-Dev] Improve error msgs?

2006-06-13 Thread Georg Brandl
In abstract.c, there are many error messages like type_error("object does not support item assignment"); It helps debugging if the object's type was prepended. Should I go through the code and try to enhance them where possible? Georg ___ Python-Dev m

[Python-Dev] Long options support

2006-06-14 Thread Georg Brandl
I've just closed a bug report wishing for long option support, pointing to a patch sitting in the patch tracker implementing this. Should we accept at least the very common options "--help" and "--version" in 2.5? Georg ___ Python-Dev mailing list Pyth

[Python-Dev] Bug in stringobject?

2006-06-16 Thread Georg Brandl
In string_replace, there is if (PyString_Check(from)) { /* Can this be made a '!check' after the Unicode check? */ } #ifdef Py_USING_UNICODE if (PyUnicode_Check(from)) return PyUnicode_Replace((PyObject *)self,

Re: [Python-Dev] Improve error msgs?

2006-06-17 Thread Georg Brandl
Georg Brandl wrote: > In abstract.c, there are many error messages like > > type_error("object does not support item assignment"); > > It helps debugging if the object's type was prepended. > Should I go through the code and try to enhance them > where po

Re: [Python-Dev] Improve error msgs?

2006-06-18 Thread Georg Brandl
Georg Brandl wrote: > Georg Brandl wrote: >> In abstract.c, there are many error messages like >> >> type_error("object does not support item assignment"); >> >> It helps debugging if the object's type was prepended. >> Should I go thro

Re: [Python-Dev] Switch statement

2006-06-20 Thread Georg Brandl
Guido van Rossum wrote: > On 6/19/06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> > I say, let someone give a complete implementation a try, and then try >> > to modify as much standard library code as possible to use it. Then >> > report back. That would be a very interesting experiment to do.

Re: [Python-Dev] Switch statement

2006-06-21 Thread Georg Brandl
Ka-Ping Yee wrote: > On Wed, 21 Jun 2006, Phillip J. Eby wrote: >> Well, EIBTI and all that: >> >> switch x: >> case == 1: foo(x) >> case in S: bar(x) >> >> It even lines up nicely. :) > > Hmm, this is rather nice. I can imagine possible use cases for > > switch x: >

Re: [Python-Dev] PyRange_New() alternative?

2006-06-21 Thread Georg Brandl
Ralf W. Grosse-Kunstleve wrote: > http://docs.python.org/dev/whatsnew/ports.html says: > > The PyRange_New() function was removed. It was never documented, never used > in the core code, and had dangerously lax error checking. > > I use this function (don't remember how I found it; this was yea

Re: [Python-Dev] Switch statement

2006-06-22 Thread Georg Brandl
Guido van Rossum wrote: >> I've also been wondering whether the 'case' keyword is really necessary? >> Would any ambiguities or other parsing problems arise if you wrote: >> >> switch x: >> 1: foo(x) >> 2: bar(x) >> >> It is debatable whether this is more or less readable,

Re: [Python-Dev] Switch statement

2006-06-22 Thread Georg Brandl
Guido van Rossum wrote: > On 6/22/06, Georg Brandl <[EMAIL PROTECTED]> wrote: >> Guido van Rossum wrote: >> >> >> I've also been wondering whether the 'case' keyword is really necessary? >> >> Would any ambiguities or other pa

Re: [Python-Dev] PyRange_New() alternative?

2006-06-22 Thread Georg Brandl
Ralf W. Grosse-Kunstleve wrote: > --- Georg Brandl <[EMAIL PROTECTED]> wrote: > >> Ralf W. Grosse-Kunstleve wrote: >> > http://docs.python.org/dev/whatsnew/ports.html says: >> > >> > The PyRange_New() function was removed. It was never documented,

Re: [Python-Dev] Switch statement

2006-06-22 Thread Georg Brandl
M.-A. Lemburg wrote: > A nice side-effect would be that could easily use the > same approach to replace the often used default-argument-hack, > e.g. > > def fraction(x, int=int, float=float): > return float(x) - int(x) > > This would then read: > > def fraction(x): > const int, float >

Re: [Python-Dev] Switch statement

2006-06-22 Thread Georg Brandl
Fredrik Lundh wrote: > I'm not sure it should, actually -- the primary form is more flexible, > and it better matches how things work: it's the expression that's > special, not the variable. > > and things like > > radian = degree * static (math.pi / 180) > > would be pretty nice, for th

Re: [Python-Dev] Simple Switch statement

2006-06-25 Thread Georg Brandl
Raymond Hettinger wrote: >>>No thanks. That is its own can of worms. The obvious solutions (like const >>>declarations, macros, or a syntax to force compile-time expression >>>evaluation) >>>are unlikely to sit well because they run afoul Python's deeply ingrained >>>dynamism. >>> >>> >> >>I

Re: [Python-Dev] PEP 328 and PEP 338, redux

2006-06-28 Thread Georg Brandl
Guido van Rossum wrote: > On 6/27/06, Greg Ewing <[EMAIL PROTECTED]> wrote: >> Giovanni Bajo wrote: >> >> > This is where I wonder why the "def __main__()" PEP was rejected in the >> > first place. It would have solved this problem as well. >> >> Could this be reconsidered for Py3k? > > You have a

Re: [Python-Dev] xturtle.py a replacement for turtle.py(!?) ATTENTION PLEASE!

2006-06-28 Thread Georg Brandl
Guido van Rossum wrote: > It was already patched by the other Georg. Thanks for the quick fix, georgbot! My pleasure, even if there's a difference between "Georg" and "Gregor" ;) cheers, Georg ___ Python-Dev mailing list Python-Dev@python.org http://ma

[Python-Dev] document @property?

2006-06-29 Thread Georg Brandl
In followup to a clpy discussion, should the docs contain a note that property can be used as a decorator for creating read-only properties? Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsub

[Python-Dev] LOAD_CONST POP_TOP

2006-06-30 Thread Georg Brandl
Hi, the following patch tries to fix the LOAD_CONST POP_TOP optimization lost in 2.5 (bug #1333982). An example for this is: def f(): 'a' # docstring 'b' Georg PS: Hmm. While looking, I see that 2.4 doesn't optimize away other constants like def g(): 1 Index: Python/compile.c ===

Re: [Python-Dev] Empty Subscript PEP on Wiki - keep or toss?

2006-06-30 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > Noam Raphael posted an empty subscript PEP on the Python Wiki: > > http://wiki.python.org/moin/EmptySubscriptListPEP > > It's not linked to by any other pages on the wiki. Is there a reason it > wasn't added to the peps repository? Perhaps the author forgot to sub

Re: [Python-Dev] Bug in stringobject?

2006-07-01 Thread Georg Brandl
Georg Brandl wrote: > In string_replace, there is > > if (PyString_Check(from)) { > /* Can this be made a '!check' after the Unicode check? */ > } > #ifdef Py_USING_UNICODE > if (PyUnicode_Check(from)) > return

Re: [Python-Dev] Bug in stringobject?

2006-07-01 Thread Georg Brandl
Fredrik Lundh wrote: > Georg Brandl wrote: > >>> Can this be correct if from or to isn't a string object, but a >>> char buffer compatible object? >> >> May I note that this is still unresolved? I can submit a bug report >> and add it to PEP 356

Re: [Python-Dev] Time-out in URL Open

2006-07-04 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > Facundo> I need a timeout in urlopen, just to be able to make: > > urllib2.urlopen("http://no.host.org";, timeout=2) > > Facundo> This is actually not possible, but I'll make it work. > > Facundo> I want to know, please, if this is useful in genera

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-05 Thread Georg Brandl
Guido van Rossum wrote: > On 7/5/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: >> At 12:18 AM 7/5/2006 +0200, Guido van Rossum wrote: >> >I don't see anything else that's attractive. The realistic options are: >> > >> >1. do nothing >> >2. extend global's meaning >> >3. add outer keyword >> >> Did

Re: [Python-Dev] "Missing" 2.5 feature

2006-07-08 Thread Georg Brandl
Tim Peters wrote: > Back in: > > http://mail.python.org/pipermail/python-dev/2005-March/051856.html > > I made a pitch for adding: > > sys._current_frames() > > to 2.5, which would return a dict mapping each thread's id to that > thread's current (Python) frame. As noted there, an exte

Re: [Python-Dev] "Missing" 2.5 feature

2006-07-09 Thread Georg Brandl
Richard Jones wrote: > On 09/07/2006, at 9:05 AM, Anthony Baxter wrote: >> I'm really not keen on this seeming tide of new features that >> seem to be popping up. We're only a few days away from the second and >> final planned beta - it's getting _awfully_ late to be slotting in >> new features. >

[Python-Dev] Birkenfeld's gone

2006-01-08 Thread Georg Brandl
Hello, today, when two Python developers here had approached me about the PSF, I realized that it is time to correct a mistake which I had made over three years ago, when I discovered Linux, free software, Usenet etc (I was sixteen at that time). I then assumed a different name, partly to anonym

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins] r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-08 Thread Georg Brandl
Neal Norwitz wrote: > [moving to python-dev] > >> On 1/7/06, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >> > Well, it is not the test that's broken... it's compiler. > > [In reference to: > http://mail.python.org/pipermail/python-checkins/2006-January/048715.html] > > In the past, we haven't

[Python-Dev] test_curses

2006-01-08 Thread Georg Brandl
The call to curses.setupterm() leaves my terminal in a bad state. The reset program outputs: Erase set to delete. Kill set to control-U (^U). Interrupt set to control-C (^C). Doesn't the setupterm() have to be paired with something like shutdownterm()? regards, Georg ___

[Python-Dev] locale and LC_NUMERIC

2006-01-08 Thread Georg Brandl
Hi, >>> import locale >>> locale.setlocale(locale.LC_NUMERIC, "") '[EMAIL PROTECTED]' >>> "%f" % 1.0 '1.00' >>> u"%f" % 1.0 u'1,00' >>> Is this intended? This breaks test_format on my box when test_builtin (method test_float_with_comma) is executed first. regards, Georg __

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Georg Brandl
Martin v. Löwis wrote: > Georg Brandl wrote: >> >>> import locale >> >>> locale.setlocale(locale.LC_NUMERIC, "") >> '[EMAIL PROTECTED]' >> >>> "%f" % 1.0 >> '1.00' >> >>>

Re: [Python-Dev] test_curses

2006-01-09 Thread Georg Brandl
Michael Hudson wrote: > Georg Brandl <[EMAIL PROTECTED]> writes: > >> The call to curses.setupterm() leaves my terminal in a bad state. > > Hmm. > >> The reset program outputs: >> Erase set to delete. >> Kill set to control-U (^U). >> Interr

Re: [Python-Dev] test_curses

2006-01-10 Thread Georg Brandl
Michael Hudson wrote: > Georg Brandl <[EMAIL PROTECTED]> writes: > >> Michael Hudson wrote: >>> Georg Brandl <[EMAIL PROTECTED]> writes: >>> >>>> The call to curses.setupterm() leaves my terminal in a bad state. >>> >>

Re: [Python-Dev] Include ctypes into core Python?

2006-01-10 Thread Georg Brandl
Delaney, Timothy (Tim) wrote: > Guido van Rossum wrote: > >> On 1/10/06, Thomas Heller <[EMAIL PROTECTED]> wrote: >>> I would like to suggest to include ctypes into core Python, starting >>> with the 2.5 release. >> >> On the one hand I agree that this is a useful module, popular, mature >> etc.

[Python-Dev] Python icon

2006-01-14 Thread Georg Brandl
Hi, does Python have an official icon? Not py.ico from PC/, that's a bit ugly and does not scale. Has no designerhead ever done such a thing? Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Uns

Re: [Python-Dev] Python icon

2006-01-17 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > >> does Python have an official icon? > > Ping> i found some images at http://www.pythonology.com/logos... > > It appears the yin/yang Python's on that page are being used in the new site > (beta.python.org). I don't know if that makes it official or not though

Re: [Python-Dev] [Python-checkins] r42116 - python/branches/release24-maint/Lib/unittest.py

2006-01-20 Thread Georg Brandl
Barry Warsaw wrote: > On Fri, 2006-01-20 at 21:43 +0100, Thomas Wouters wrote: > >> I don't believe this belongs in 2.4, since it can, actually, break code. >> Code that depends on the current situation, _TestCase__attributename. >> Fragile code, to be sure, but still. If there were a compelling r

[Python-Dev] New Pythondoc by effbot

2006-01-21 Thread Georg Brandl
What Fredrik hacks together there (http://www.effbot.org/lib) is very impressive. I especially like the "permalinks" in this style: http://effbot.org/lib/os.path.join What I would suggest (for any new doc system) is a "split" view: on the left, the normal text, on the right, an area with only t

Re: [Python-Dev] [Python-checkins] r42116 - python/branches/release24-maint/Lib/unittest.py

2006-01-21 Thread Georg Brandl
Fred L. Drake, Jr. wrote: > On Saturday 21 January 2006 13:37, Martin v. Löwis wrote: > > The registered ones: > > > > http://www.iana.org/assignments/uri-schemes > > I think that these should be supported. That's okay, but it may be much work to find out which of them use relative paths, fra

Re: [Python-Dev] New Pythondoc by effbot

2006-01-21 Thread Georg Brandl
Guido van Rossum wrote: > On 1/21/06, Terry Reedy <[EMAIL PROTECTED]> wrote: >> On this page, 8 of 30 entries have a 'new in' comment. For anyone with no >> interest in the past, these constitute noise. I wonder if for 3.0, the >> timer can be reset and the docs start clean again. To keep them b

Re: [Python-Dev] New Pythondoc by effbot

2006-01-21 Thread Georg Brandl
Aahz wrote: > On Sat, Jan 21, 2006, Guido van Rossum wrote: >> >> Why? If wikipedia can do without moderation (for most pages) then why >> couldn't the Python docs? > > If we're strictly talking about user comments, I won't disagree, but the > main docs do need to be "authoritative" IMO. > > Asi

Re: [Python-Dev] New Pythondoc by effbot

2006-01-22 Thread Georg Brandl
Guido van Rossum wrote: > On 1/21/06, Georg Brandl <[EMAIL PROTECTED]> wrote: >> What Fredrik hacks together there (http://www.effbot.org/lib) is very >> impressive. I especially like the "permalinks" in this style: >> >> http://effbot.org/lib/os.path.joi

Re: [Python-Dev] New Pythondoc by effbot

2006-01-22 Thread Georg Brandl
Walter Dörwald wrote: > Georg Brandl wrote: > >>> [...] >>> Can you mock that up a bit? I'm somewhat confused about what you're >>> requesting, and also worried that it would take up too >>> much horizontal space. (Despite that monitors are wid

Re: [Python-Dev] New Pythondoc by effbot

2006-01-22 Thread Georg Brandl
Guido van Rossum wrote: >> > Which (despite having "perma" in its name) evaporates and leaves >> > behind a link to os.path.html#join. > >> There may be other uses (e.g. marking a certain location in the docs with >> a "permalink" marker so that one can point the user to /lib/marker. >> Especiall

Re: [Python-Dev] New Pythondoc by effbot

2006-01-22 Thread Georg Brandl
Facundo Batista wrote: > 2006/1/22, Georg Brandl <[EMAIL PROTECTED]>: > >> Guido van Rossum wrote: >> > ... >> > Why? If wikipedia can do without moderation (for most pages) then why >> > couldn't the Python docs? >> >> Well, why no

Re: [Python-Dev] New Pythondoc by effbot

2006-01-22 Thread Georg Brandl
Tim Parkin wrote: > Tim Parkin wrote: >> Guido van Rossum wrote: >> >>>I believe there's a CSS trick (most often used for images) that can >>>makes the summary window "float" to the right so that below it the >>>main text resumes the full breadth of the window. If you can pull that >>>off I think

[Python-Dev] YAML (was Re: Extension to ConfigParser)

2006-01-31 Thread Georg Brandl
Guido van Rossum wrote: >> But like it or not, configuration files are often used to store data >> about what a program does - not just the UI options. Storing this in a >> human readable and editable format is of great advantage. >> >> Yes, a lot of the entries will never be modified by a user -

Re: [Python-Dev] any support for a methodcaller HOF?

2006-02-03 Thread Georg Brandl
Alex Martelli wrote: >> A class I wrote (and lost) ages ago was a "placeholder" class, so if >> 'X' was an instance of this class, "X + 1" was roughly equivalent to >> "lambda x:x+1" and "X.method(zip, zop)" was roughly equivalent to your >> "methodcaller("method", zip, zop)". I threw it away whe

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

2006-02-05 Thread Georg Brandl
Alex Martelli wrote: > When teaching some programming to total newbies, a common frustration > is how to explain why a==b is False when a and b are floats computed > by different routes which ``should'' give the same results (if > arithmetic had infinite precision). Decimals can help, but an

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.

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

Re: [Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation

2006-02-09 Thread Georg Brandl
Eric Nieuwland wrote: > Travis Oliphant wrote: >> PEP: ### >> Title: Allowing any object to be used for slicing >> [...] >> Rationale >> >>Currently integers and long integers play a special role in slice >>notation in that they are the only objects allowed in slice >>syntax. In other

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

2006-02-09 Thread Georg Brandl
Bengt Richter wrote: >>1) Replace lambda args: value with >> >> args -> value >> >>or something equivalently concise, or >> > Yet another bike shed color chip: > > !(args:expr) # <==> lambda args:expr > and > !(args::suite) # <==> (lambda args::suite) Please drop it. Guido pronounced

[Python-Dev] The decorator(s) module

2006-02-11 Thread Georg Brandl
Hi, it has been proposed before, but there was no conclusive answer last time: is there any chance for 2.5 to include commonly used decorators in a module? Of course not everything that jumps around should go in, only pretty basic stuff that can be widely used. Candidates are: - @decorator. Thi

Re: [Python-Dev] release plan for 2.5 ?

2006-02-11 Thread Georg Brandl
Guido van Rossum wrote: > Next, the schedule. Neal's draft of the schedule has us releasing 2.5 > in October. That feels late -- nearly two years after 2.4 (which was > released on Nov 30, 2004). Do people think it's reasonable to strive > for a more aggressive (by a month) schedule, like this: >

Re: [Python-Dev] release plan for 2.5 ?

2006-02-11 Thread Georg Brandl
Guido van Rossum wrote: > - setuplib? Wouldn't it make sense to add this to the 2.5 stdlib? If you mean setuptools, I'm a big +1 (if it's production-ready by that time). Together with a whipped up cheese shop we should finally be able to put up something equal to cpan/rubygems. Georg __

[Python-Dev] The decorator(s) module

2006-02-11 Thread Georg Brandl
Hi, it has been proposed before, but there was no conclusive answer last time: is there any chance for 2.5 to include commonly used decorators in a module? Of course not everything that jumps around should go in, only pretty basic stuff that can be widely used. Candidates are: - @decorator. Thi

[Python-Dev] Where to put "post-it notes"?

2006-02-11 Thread Georg Brandl
I just updated the general copyright notice to include the year 2006. This is scattered in at least 6 files (I found that many searching for 2004 and 2005) which would be handy to record somewhere so that next year it's easier. Where does this belong? Georg ___

Re: [Python-Dev] Where to put "post-it notes"?

2006-02-11 Thread Georg Brandl
Nick Coghlan wrote: > Georg Brandl wrote: >> I just updated the general copyright notice to include the >> year 2006. This is scattered in at least 6 files (I found that many searching >> for 2004 and 2005) which would be handy to record somewhere so that next year >> i

<    11   12   13   14   15   16