On Jun 29, 2011, at 01:05 AM, Vinay Sajip wrote:
>Ned Deily acm.org> writes:
>
>> Could some text be added to the svn browser pages to at least indicate
>> that the repo is no longer being updated with a link to the
>> hg.python.org browser? I'm not sure what to do about the repos
>> themsel
On Wed, Jun 29, 2011 at 7:42 AM, Georg Brandl wrote:
> On 28.06.2011 14:24, Terry Reedy wrote:
>> I think a PEP is needed.
>
> Absolutely. And I hope the hypothetical PEP would be rejected in this form.
>
> We need to stop making incompatible changes to Python 3. We had the chance
> and took it
Victor Stinner, 28.06.2011 15:43:
In Python 2, open() opens the file in binary mode (e.g. file.readline()
returns a byte string). codecs.open() opens the file in binary mode by
default, you have to specify an encoding name to open it in text mode.
In Python 3, open() opens the file in text mode
Ned Deily acm.org> writes:
> Could some text be added to the svn browser pages to at least indicate
> that the repo is no longer being updated with a link to the
> hg.python.org browser? I'm not sure what to do about the repos
> themselves if people attempt to do an svn co. Perhaps that sho
Nick Coghlan gmail.com> writes:
>
> On Tue, Jun 28, 2011 at 1:09 AM, renaud gmail.com> wrote:
> > Nick Coghlan gmail.com> writes:
> >
> >> I hit a snag with this. The real tests of the PEP 380 functionality
> >> aren't currently part of the patch - they're a big set of "golden
> >> output" tes
On 6/28/2011 5:42 PM, Georg Brandl wrote:
At the very least, a change like this needs a transitional strategy, like
it has been used during the 2.x series:
* In 3.3, accept "locale" as the encoding parameter, meaning the locale encoding
* In 3.4, warn if encoding isn't given and the locale enco
Le mardi 28 juin 2011 à 09:33 -0700, Toshio Kuratomi a écrit :
> Issuing a warning like "open used without explicit encoding may lead
> to errors" if open() is used without an explicit encoding would help
> a little (at least, people who get errors would then have an inkling
> that the culprit migh
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 06/28/2011 12:52 PM, Bill Janssen wrote:
> M.-A. Lemburg wrote:
>
>> How about a more radical change: have open() in Py3 default to
>> opening the file in binary mode, if no encoding is given (even
>> if the mode doesn't include 'b') ?
>
> +1.
>
> > I don't think that Windows developer even know that they are writing
> > files into the ANSI code page. MSDN documentation of
> > WideCharToMultiByte() warns developer that the ANSI code page is not
> > portable, even accross Windows computers:
>
> Probably true. But for many uses they also do
On 28.06.2011 14:24, Terry Reedy wrote:
>> As discussed before on this list, I propose to set the default encoding
>> of open() to UTF-8 in Python 3.3, and add a warning in Python 3.2 if
>> open() is called without an explicit encoding and if the locale encoding
>> is not UTF-8. Using the warning,
Le mardi 28 juin 2011 à 16:02 +0200, M.-A. Lemburg a écrit :
> How about a more radical change: have open() in Py3 default to
> opening the file in binary mode, if no encoding is given (even
> if the mode doesn't include 'b') ?
I tried your suggested change: Python doesn't start.
sysconfig uses t
On 28 June 2011 18:22, Michael Foord wrote:
> On 28/06/2011 18:06, Terry Reedy wrote:
>>
>> On 6/28/2011 10:46 AM, Paul Moore wrote:
>>
>>> I use Windows, and come from the UK, so 99% of my text files are
>>> ASCII. So the majority of my code will be unaffected. But in the
>>> occasional situation
On Tue, Jun 28, 2011 at 06:28, Nick Coghlan wrote:
> On Tue, Jun 28, 2011 at 10:56 PM, Michael Foord
> wrote:
> > I don't think "data attributes" is clear or precise. Is a property a data
> > attribute (well it depends how it is implemented and what it does), is a
> > staticmethod a data attribu
Ethan Furman wrote:
Michael Foord wrote:
On 28/06/2011 17:34, Terry Reedy wrote:
On 6/28/2011 10:48 AM, Michael Foord wrote:
On 28/06/2011 15:36, Terry Reedy wrote:
S = open('myfile.txt').read()
now return a text string in both Py2 and Py3 and a subsequent
'abc' in S
works in both.
Nope,
Michael Foord wrote:
On 28/06/2011 17:34, Terry Reedy wrote:
On 6/28/2011 10:48 AM, Michael Foord wrote:
On 28/06/2011 15:36, Terry Reedy wrote:
S = open('myfile.txt').read()
now return a text string in both Py2 and Py3 and a subsequent
'abc' in S
works in both.
Nope, it returns a bytestri
On 28.06.2011 19:06, Terry Reedy wrote:
> On 6/28/2011 10:46 AM, Paul Moore wrote:
>
>> I use Windows, and come from the UK, so 99% of my text files are
>> ASCII. So the majority of my code will be unaffected. But in the
>> occasional situation where I use a £ sign, I'll get encoding errors,
>
>
On 28.06.2011 16:06, Victor Stinner wrote:
> Le mardi 28 juin 2011 à 14:41 +0100, Michael Foord a écrit :
>> On 24/06/2011 15:55, R. David Murray wrote:
>> > On Fri, 24 Jun 2011 10:52:40 +0200, Mark Dickinson
>> > wrote:
>> >> EuroPython 2011 Language Summit
>> >> ===
On 6/28/2011 11:35 AM, Michael Foord wrote:
On 28/06/2011 16:23, Terry Reedy wrote:
So-called 'staticmethods' are not really methods either, but are class
function attributes that are just functions and not treated as
methods. The decorator that negates normal method treatment
could/should hav
On Tue, 28 Jun 2011 13:06:44 -0400
Terry Reedy wrote:
>
> As for practicality. Notepad++ on Windows offers ANSI, utf-8 (w,w/o
> BOM), utf-16 (big/little endian).
Well, that's *one* application. We would need much more data than that.
> I believe that ODF documents are utf-8
> encoded xml (com
Michael Foord wrote:
> Thanks. Support for Unicode character classes was one of the
> improvements needed in the re module reported from the language summit
> -
> so I wonder if the changes in regex are sufficient.
I guess it depends on what you're asking -- what does "support for
Unicode chara
On 28/06/2011 18:08, Bill Janssen wrote:
Michael Foord wrote:
The new regex library has some great improvements:
http://bugs.python.org/issue2636
It also has users and committed maintainers, so I hope we can bring it
into 3.3. It wasn't easy to tell from skimming the change notes that
U
On 28/06/2011 18:06, Terry Reedy wrote:
On 6/28/2011 10:46 AM, Paul Moore wrote:
I use Windows, and come from the UK, so 99% of my text files are
ASCII. So the majority of my code will be unaffected. But in the
occasional situation where I use a £ sign, I'll get encoding errors,
I do not unde
Michael Foord wrote:
> The new regex library has some great improvements:
>
> http://bugs.python.org/issue2636
>
> It also has users and committed maintainers, so I hope we can bring it
> into 3.3. It wasn't easy to tell from skimming the change notes that
> Unicode character classes are am
On 6/28/2011 10:46 AM, Paul Moore wrote:
I use Windows, and come from the UK, so 99% of my text files are
ASCII. So the majority of my code will be unaffected. But in the
occasional situation where I use a £ sign, I'll get encoding errors,
I do not understand this. With utf-8 you would never g
Terry Reedy wrote:
> > Making such default encodings depend on the locale has already
> > failed to work when we first introduced a default encoding in
> > Py2, so I don't understand why we are repeating the same
> > mistake again in Py3 (only in a different area).
>
> I do not remember any prop
M.-A. Lemburg wrote:
> How about a more radical change: have open() in Py3 default to
> opening the file in binary mode, if no encoding is given (even
> if the mode doesn't include 'b') ?
+1.
> That'll make it compatible to the Py2 world again and avoid
> all the encoding guessing.
Yep.
Bill
On 28/06/2011 17:34, Terry Reedy wrote:
On 6/28/2011 10:48 AM, Michael Foord wrote:
On 28/06/2011 15:36, Terry Reedy wrote:
S = open('myfile.txt').read()
now return a text string in both Py2 and Py3 and a subsequent
'abc' in S
works in both.
Nope, it returns a bytestring in Python 2.
Whic
Antoine Pitrou wrote:
> On Mon, 27 Jun 2011 10:01:13 PDT
> Bill Janssen wrote:
> > I see that parc-snowleopard-1 went down again. I've done a software
> > update, rebooted, and installed the latest buildslave, 0.8.4. I can
> > ping dinsdale.python.org successfully from the machine. However, w
On 28/06/2011 17:37, Ned Deily wrote:
Not surprisingly, people are still attempting to browse and/or checkout
Python source from svn.python.org. They could be following out-of-date
instructions from somewhere or might be expecting the svn repos are
mirroring the hg ones. This causes wasted time
Not surprisingly, people are still attempting to browse and/or checkout
Python source from svn.python.org. They could be following out-of-date
instructions from somewhere or might be expecting the svn repos are
mirroring the hg ones. This causes wasted time and frustration for
users and for u
On 6/28/2011 10:48 AM, Michael Foord wrote:
On 28/06/2011 15:36, Terry Reedy wrote:
S = open('myfile.txt').read()
now return a text string in both Py2 and Py3 and a subsequent
'abc' in S
works in both.
Nope, it returns a bytestring in Python 2.
Which, in Py2 is a str() object. In both Pyth
On Tue, Jun 28, 2011 at 03:46:12PM +0100, Paul Moore wrote:
> On 28 June 2011 14:43, Victor Stinner wrote:
> > As discussed before on this list, I propose to set the default encoding
> > of open() to UTF-8 in Python 3.3, and add a warning in Python 3.2 if
> > open() is called without an explicit e
On 6/28/2011 9:20 AM, Steven D'Aprano wrote:
>>> class C:
... def method(self, x):
... return x+1
...
>>> c = C()
>>> c.method = types.MethodType(lambda self, x: x+101, c)
types.MethodType creates a bound method, not a method. A bound method is
a partial or curried function, which is to sa
On 28 June 2011 16:06, Steffen Daode Nurpmeso wrote:
> @ Paul Moore wrote (2011-06-28 16:46+0200):
>> UTF-8 without BOM displays incorrectly in vim(1)
>
> Stop right now (you're oh so wrong)! :-)
Sorry. Please add "using the default settings of gvim on Windows". My
context throughout was Window
On Tue, Jun 28, 2011 at 7:20 AM, Steven D'Aprano wrote:
> Michael Foord wrote:
>
>> What do you mean by "instances can have methods as instance attributes"?
>> Once you attach a bound method directly to an instance it becomes a slightly
>> different beast I think. (On top of which that is pretty r
On 28/06/2011 16:23, Terry Reedy wrote:
On 6/28/2011 7:51 AM, R. David Murray wrote:
Also, instances can have methods as instance attributes.
Functions that are instance attributes do not act like methods
(instance.func() does not automagically turn instance in the first arg
of func) and ha
On Tue, Jun 28, 2011 at 5:35 AM, Michael Foord
wrote:
>
> Well, they're *usually* implemented as methods and backed by a real instance
> attribute. Usually (but not always) it makes more sense (IME) to group them
> with methods. The fact that they're *accessed* as an attribute is the
> uninteresti
On 6/28/2011 7:51 AM, R. David Murray wrote:
Also, instances can have methods as instance attributes.
Functions that are instance attributes do not act like methods
(instance.func() does not automagically turn instance in the first arg
of func) and have never, to my knowledge, been called me
@ Paul Moore wrote (2011-06-28 16:46+0200):
> UTF-8 without BOM displays incorrectly in vim(1)
Stop right now (you're oh so wrong)! :-)
(By the way: UTF-8 and BOM?
Interesting things i learn on this list.
And i hope in ten years we can laugh about this -> UTF-8
transition all over the place, 'c
On Tue, 28 Jun 2011 10:41:38 -0400
Terry Reedy wrote:
> On 6/28/2011 10:06 AM, Antoine Pitrou wrote:
> > On Tue, 28 Jun 2011 15:43:05 +0200
> > Victor Stinner wrote:
> >> - ISO-8859-1 os some FreeBSD systems
> >> - ANSI code page on Windows, e.g. cp1252 (close to ISO-8859-1) in
> >> Western E
On 28/06/2011 15:36, Terry Reedy wrote:
On 6/28/2011 10:02 AM, M.-A. Lemburg wrote:
How about a more radical change: have open() in Py3 default to
opening the file in binary mode, if no encoding is given (even
if the mode doesn't include 'b') ?
That'll make it compatible to the Py2 world again
On 28 June 2011 14:43, Victor Stinner wrote:
> As discussed before on this list, I propose to set the default encoding
> of open() to UTF-8 in Python 3.3, and add a warning in Python 3.2 if
> open() is called without an explicit encoding and if the locale encoding
> is not UTF-8. Using the warning
On 6/28/2011 10:06 AM, Antoine Pitrou wrote:
On Tue, 28 Jun 2011 15:43:05 +0200
Victor Stinner wrote:
- ISO-8859-1 os some FreeBSD systems
- ANSI code page on Windows, e.g. cp1252 (close to ISO-8859-1) in
Western Europe, cp952 in Japan, ...
- ASCII if the locale is manually set to an empt
2011/6/28 Ned Deily :
> In article ,
> benjamin.peterson wrote:
>
>> http://hg.python.org/cpython/rev/0d0ca6f95d9d
>> changeset: 70879:0d0ca6f95d9d
>> user: Benjamin Peterson
>> date: Sun Jun 19 17:17:30 2011 -0500
>> summary:
>> remove duplicate -I
>>
>> files:
>> Makefile.p
On 6/28/2011 10:02 AM, M.-A. Lemburg wrote:
How about a more radical change: have open() in Py3 default to
opening the file in binary mode, if no encoding is given (even
if the mode doesn't include 'b') ?
That'll make it compatible to the Py2 world again
I disagree. I believe
S = open('myfile
On 6/28/2011 9:43 AM, Victor Stinner wrote:
In Python 2, open() opens the file in binary mode (e.g. file.readline()
returns a byte string). codecs.open() opens the file in binary mode by
default, you have to specify an encoding name to open it in text mode.
In Python 3, open() opens the file in
On Tue, 28 Jun 2011 15:43:05 +0200
Victor Stinner wrote:
> - ISO-8859-1 os some FreeBSD systems
> - ANSI code page on Windows, e.g. cp1252 (close to ISO-8859-1) in
> Western Europe, cp952 in Japan, ...
> - ASCII if the locale is manually set to an empty string or to "C", or
> if the environment
Le mardi 28 juin 2011 à 14:41 +0100, Michael Foord a écrit :
> On 24/06/2011 15:55, R. David Murray wrote:
> > On Fri, 24 Jun 2011 10:52:40 +0200, Mark Dickinson
> > wrote:
> >> EuroPython 2011 Language Summit
> >> ===
> > [...]
> >> Unicode character classes is a
Victor Stinner wrote:
> In Python 2, open() opens the file in binary mode (e.g. file.readline()
> returns a byte string). codecs.open() opens the file in binary mode by
> default, you have to specify an encoding name to open it in text mode.
>
> In Python 3, open() opens the file in text mode by d
In Python 2, open() opens the file in binary mode (e.g. file.readline()
returns a byte string). codecs.open() opens the file in binary mode by
default, you have to specify an encoding name to open it in text mode.
In Python 3, open() opens the file in text mode by default. (It only
opens the binar
On 24/06/2011 15:55, R. David Murray wrote:
On Fri, 24 Jun 2011 10:52:40 +0200, Mark Dickinson wrote:
EuroPython 2011 Language Summit
===
[...]
Unicode character classes is a particular need). [Subtopic: what needs
to be done to get the new regex module
On Tue, Jun 28, 2011 at 11:27 PM, Michael Foord
wrote:
> Technically also via __getattribute__ when overridden.
Since object.__getattribute__ is the hook that implements the entire
attribute lookup protocol, *all* attributes are technically retrieved
via __getattribute__ (which is why overriding
On Tue, Jun 28, 2011 at 10:56 PM, Michael Foord
wrote:
> I don't think "data attributes" is clear or precise. Is a property a data
> attribute (well it depends how it is implemented and what it does), is a
> staticmethod a data attribute (no - but then Tres' question - it isn't a
> normal method e
On 28/06/2011 14:20, Steven D'Aprano wrote:
Michael Foord wrote:
What do you mean by "instances can have methods as instance
attributes"? Once you attach a bound method directly to an instance
it becomes a slightly different beast I think. (On top of which that
is pretty rare behaviour.)
>>
On 28/06/2011 13:56, Michael Foord wrote:
On 28/06/2011 13:31, Nick Coghlan wrote:
On Tue, Jun 28, 2011 at 8:54 PM, Michael Foord
wrote:
The problem with "data attributes" is that it doesn't mean
*anything*, which
I suppose is useful for invented terminology, but it means it
doesn't convey
a
Michael Foord wrote:
What do you mean by "instances can have methods as instance attributes"?
Once you attach a bound method directly to an instance it becomes a
slightly different beast I think. (On top of which that is pretty rare
behaviour.)
>>> class C:
... def method(self, x):
...
On 28/06/2011 13:31, Nick Coghlan wrote:
On Tue, Jun 28, 2011 at 8:54 PM, Michael Foord
wrote:
The problem with "data attributes" is that it doesn't mean *anything*, which
I suppose is useful for invented terminology, but it means it doesn't convey
anything precise to those who haven't heard t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 06/28/2011 06:44 AM, Fred Drake wrote:
> On Tue, Jun 28, 2011 at 2:33 AM, Nick Coghlan wrote:
>> The two terms I've got out of this thread are "callable attributes"
>> (instance/static/class methods, etc) and "data attributes" (everything
>> else).
On Tue, Jun 28, 2011 at 8:54 PM, Michael Foord
wrote:
> The problem with "data attributes" is that it doesn't mean *anything*, which
> I suppose is useful for invented terminology, but it means it doesn't convey
> anything precise to those who haven't heard the term before. If it becomes
> widely
On 28/06/2011 12:51, R. David Murray wrote:
On Tue, 28 Jun 2011 11:54:39 +0100, Michael Foord
wrote:
On 28/06/2011 11:44, Fred Drake wrote:
But "callable attributes" aren't the same thing as methods; most are methods,
but not all. Sometimes, they're data used by the object. The fact that
da
On Tue, 28 Jun 2011 11:54:39 +0100, Michael Foord
wrote:
> On 28/06/2011 11:44, Fred Drake wrote:
> > But "callable attributes" aren't the same thing as methods; most are
> > methods,
> > but not all. Sometimes, they're data used by the object. The fact that
> > data attributes can be callable
On 28/06/2011 12:04, Fred Drake wrote:
On Tue, Jun 28, 2011 at 6:54 AM, Michael Foord
wrote:
Added to which there are other descriptors, notably property, that are not
directly callable but are not provided as normal "data attributes" (although
the access syntax is the same). Properties are mu
On Tue, Jun 28, 2011 at 6:54 AM, Michael Foord
wrote:
> Added to which there are other descriptors, notably property, that are not
> directly callable but are not provided as normal "data attributes" (although
> the access syntax is the same). Properties are much closer to methods as
> they are im
On 28/06/2011 11:44, Fred Drake wrote:
On Tue, Jun 28, 2011 at 2:33 AM, Nick Coghlan wrote:
The two terms I've got out of this thread are "callable attributes"
(instance/static/class methods, etc) and "data attributes" (everything
else). Both seem reasonable to me, creating two largely disjoint
On Tue, Jun 28, 2011 at 2:33 AM, Nick Coghlan wrote:
> The two terms I've got out of this thread are "callable attributes"
> (instance/static/class methods, etc) and "data attributes" (everything
> else). Both seem reasonable to me, creating two largely disjoint sets
> that together cover all the
On Mon, 27 Jun 2011 10:01:13 PDT
Bill Janssen wrote:
> I see that parc-snowleopard-1 went down again. I've done a software
> update, rebooted, and installed the latest buildslave, 0.8.4. I can
> ping dinsdale.python.org successfully from the machine. However, when I
> start the buildslave, I ge
In article ,
benjamin.peterson wrote:
> http://hg.python.org/cpython/rev/0d0ca6f95d9d
> changeset: 70879:0d0ca6f95d9d
> user:Benjamin Peterson
> date:Sun Jun 19 17:17:30 2011 -0500
> summary:
> remove duplicate -I
>
> files:
> Makefile.pre.in | 2 +-
> 1 files changed,
67 matches
Mail list logo