> > and is more consistent with the general convention, that running
> > A = B
> > causes
> > A == B
> > to be true. Currently, Class.func = staticmethod(func), and Class.func
> > = func, don't behave by this rule. If the suggestions are accepted,
> > both will.
>
> Well, given that attribute assi
Stuart Bishop wrote:
> Do people consider this a bug that should be fixed in Python 2.4.1 and Python
> 2.3.6 (if it ever
> exists), or is the resposibility for doing this transformation on the
> application that embeds
> Python?
the text you quoted is pretty clear on this:
It is envision
Just van Rossum wrote:
Skip Montanaro wrote:
Just re.sub("[\r\n]+", "\n", s) and I think you're good to go.
I don't think that in general you want to fold multiple empty lines into
one. This would be my prefered regex:
s = re.sub(r"\r\n?", "\n", s)
Catches both DOS and old-style Mac line endi
Patch review [ 1093585 ] sanity check for readline remove/replace
The functions remove_history_item and replace_history_item in the readline
module respectively remove and replace an item in the history of commands. As
outlined in bug [ 1086603 ], both functions cause a segmentation fault if the
it
Phillip, it looks like you're not going to give up. :) I really don't
want to accept your proposal into core Python, but I think you ought
to be able to implement everything you propose as part of PEAK (or
whatever other framework).
Therefore, rather than continuing to argue over the merits of you
> Removing unbound methods also breaks the 'py' lib quite a bit. The 'py.test'
> framework handles function and bound/unbound method objects all over the
> place, and uses introspection on them, as they are the objects defining the
> tests to run.
OK, I'm convinced. Taking away im_class is going
> It's about staticmethods. I was writing a class, and its
> pretty-printing method got a function for converting a value to a
> string as an argument. I wanted to supply a default function. I
> thought that it should be in the namespace of the class, since its
> main use lies there. So I made it a
Hello,
I would like to add here another small thing which I encountered this
week, and seems to follow the same logic as does Guido's proposal.
It's about staticmethods. I was writing a class, and its
pretty-printing method got a function for converting a value to a
string as an argument. I wante
Dear Python Colleague:
You will be happy to know that the PyCon Program
Committee, after lengthy deliberations, has now
finalized the program for PyCon DC 2005. I can tell
you that the decision-making was very difficult, as
the standard of submissions was even higher than
last year.
You can see
On Thu, 2005-01-20 at 14:12 +, Michael Hudson wrote:
> Donovan Baarda <[EMAIL PROTECTED]> writes:
>
> > On Wed, 2005-01-19 at 13:37 +, Michael Hudson wrote:
> >> Donovan Baarda <[EMAIL PROTECTED]> writes:
[...]
> >> The main oddness about python threads (before 2.3) is that they run
> >> w
[Guido van Rossum]
> There's one other problem that Phillip tries to tackle in his
> proposal: how to implement the "rich" version of an interface if all
> you've got is a partial implementation (e.g. you might have readline()
> but you need readlines()). I think this problem is worthy of a
> solut
Tim Peters wrote:
My experience disagrees, and I gave a specific example from just the
last day. High-level coverage of the important bits is served (and
served well) by Andrew's "What's New in Python" doc. (Although I'll
note that when I did releases, I tried to sort section contents in
NEWS, to
Martin v. Löwis wrote:
Irmen de Jong wrote:
That sounds very convenient, thanks.
Ok, welcome to the project! Please let me know whether
it "works".
It looks that it works, I seem to be able to add a new
attachment to the spwd patch- which I will do shortly.
*
Now that I'm part of the developers gr
[Tim Peters]
>> It's also extremely useful in practice to have a list of repaired
>> bugs in NEWS!
[Martin v. Löwis]
> I'm not convinced about that - it makes the NEWS file almost
> unreadable, as the noise is now so high if every tiny change is
> listed; it is very hard to see what the important
Tim Peters wrote:
It's also extremely useful in practice to have a list of repaired bugs
in NEWS!
I'm not convinced about that - it makes the NEWS file almost unreadable,
as the noise is now so high if every tiny change is listed; it is very
hard to see what the important changes are.
Regards,
Mart
[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 d
Irmen de Jong wrote:
That sounds very convenient, thanks.
Ok, welcome to the project! Please let me know whether
it "works".
Does the status of 'python project member' come with
certain expectations that must be complied with ? ;-)
There are a few conventions that are followed more
or less stringen
At 03:07 AM 1/20/05 -0800, Guido van Rossum wrote:
Phillip worries that solving this with interfaces would cause a
proliferation of "partial sequence" interfaces representing the needs
of various libraries. Part of his proposal comes down to having a way
to declare that some class C implements some
Thought I'd pass this along for people who don't read comp.lang.python.
Skip
--- Begin Message ---
Hello everyone,
To celebrate its second anniversary,
Python-Hosting.com is happy to announce
that it is now offering free Trac/Subversion hosting.
This offer is limited to open-source, python proj
Donovan Baarda <[EMAIL PROTECTED]> writes:
> On Wed, 2005-01-19 at 13:37 +, Michael Hudson wrote:
>> Donovan Baarda <[EMAIL PROTECTED]> writes:
> [...]
>> You've left out a very important piece of information: which version
>> of Python you are using. I'm guessing 2.3.4. Can you try 2.4?
>
>
Patch review [ 723201 ] PyArg_ParseTuple problem with 'L' format
The PyArg_ParseTuple function (PyObject *args, char *format, ...) parses the
arguments args and stores them in the variables specified following the format
argument. If format=="i", indicating an integer, but the corresponding Python
Just> Skip Montanaro wrote:
>> Just re.sub("[\r\n]+", "\n", s) and I think you're good to go.
Just> I don't think that in general you want to fold multiple empty
Just> lines into one.
Whoops. Yes.
Skip
___
Python-Dev mailing list
Pyth
Fredrik> s = s.replace("\r", "\n"["\n" in s:])
This fails on admittedly weird strings that mix line endings:
>>> s = "abc\rdef\r\n"
>>> s = s.replace("\r", "\n"["\n" in s:])
>>> s
'abcdef\n'
where universal newline mode or Just's re.sub() gadget would work.
Skip
___
Hi,
Removing unbound methods also breaks the 'py' lib quite a bit. The 'py.test'
framework handles function and bound/unbound method objects all over the
place, and uses introspection on them, as they are the objects defining the
tests to run.
It's nothing that can't be repaired, and at places
On Thu, 2005-01-20 at 11:07, Guido van Rossum wrote:
> I'd also like to explore ways of creating partial interfaces on the
> fly. For example, if we need only the read() and readlines() methods
> of the file protocol, maybe we could declare that as follows::
>
> def foo(f: file['read', 'readline
[Phillip J. Eby]
> I've revised the draft today to simplify the terminology, discussing only
> two broad classes of adapters. Since Clark's pending proposals for PEP 246
> align well with the concept of "extenders" vs. "independent adapters", I've
> refocused my PEP to focus exclusively on adding
Just van Rossum wrote:
> I don't think that in general you want to fold multiple empty lines into
> one. This would be my prefered regex:
>
>s = re.sub(r"\r\n?", "\n", s)
>
> Catches both DOS and old-style Mac line endings. Alternatively, you can
> use s.splitlines():
>
>s = "\n".join(s.sp
Skip Montanaro wrote:
> Just re.sub("[\r\n]+", "\n", s) and I think you're good to go.
I don't think that in general you want to fold multiple empty lines into
one. This would be my prefered regex:
s = re.sub(r"\r\n?", "\n", s)
Catches both DOS and old-style Mac line endings. Alternatively,
On 2005 Jan 20, at 02:47, Skip Montanaro wrote:
Phillip> Actually, this is one of those rare cases where
optimization
Phillip> and clarity go hand in hand. Human brains just don't
handle
Phillip> nesting that well. It's easy to visualize two levels of
nested
Phillip> structure,
29 matches
Mail list logo