Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Nick Coghlan
On Tue, Jun 28, 2011 at 3:05 PM, Ben Finney wrote: > I still don't have a good term for “non-callable attribute”, though. 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, c

Re: [Python-Dev] Snow Leopard buildbot failing again...

2011-06-27 Thread Martin v. Löwis
Am 27.06.2011 21:05, schrieb Bill Janssen: > I also find interesting, because > it seems a good explanation of why the build slave might go into the > zombie state of attempting to reconnect to the master. That wouldn't apply to our buildslaves, though, since

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Ben Finney
Eric Snow writes: > On Mon, Jun 27, 2011 at 8:11 PM, Ben Finney > wrote: > > "callable attributes" describes exactly what they are, in terms that > > will remain useful to the person learning Python. > > The usage of the object determines what we call it then No, the capability of the attribut

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Eric Snow
On Mon, Jun 27, 2011 at 8:11 PM, Ben Finney wrote: > Rob Cliffe writes: > >> 'function attributes' ? 'def attributes' ? > > -1. They don't have to be functions, and hence don't have to be created > by 'def'. > >> Or just stick with method attributes' ? > > "callable attributes" describes exactly

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Ben Finney
Rob Cliffe writes: > On 27/06/2011 15:08, R. David Murray wrote: > > I guess what I'm saying is that I am more comfortable calling them > > all attributes than calling them all members. The term 'members' > > isn't used anywhere in the language itself, as far as I can recall, > > whereas getattr

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Nick Coghlan
On Tue, Jun 28, 2011 at 8:46 AM, Michael Foord wrote: > So the Python 2.2 what's new talks about attributes and methods as different > things Of course the context makes it clear, but this mirrors how I use > the terms in discussion and how I see others generally using them. > > Great topic fo

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Steven D'Aprano
R. David Murray wrote: So, the correct generic term for something that can be accessed via attribute notation is attribute. The more specific term for an attribute that is a method is method. We don't currently have a more specific collective term for attributes that aren't methods. *That* is

Re: [Python-Dev] PEP 380 acceptance (was Re: EuroPython Language Summit report)

2011-06-27 Thread Nick Coghlan
On Tue, Jun 28, 2011 at 1:09 AM, renaud 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" tests in the zipfile hosted on Greg's site. Those need to be >>

[Python-Dev] pdb and generators

2011-06-27 Thread Guido van Rossum
When debugging generators (especially when using them as coroutines) I often want 'next' to step over a yield statement/expression, instead of the current behavior, which is to step out of the frame, since pdb doesn't seem to see the difference between yield and return. Or I could live with a separ

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
On 27/06/2011 23:18, Terry Reedy wrote: On 6/27/2011 2:33 PM, Terry Reedy wrote: Let me repeat that that is historically wrong for Python, and illustrate why the term 'members' should not be used. From the 1.5 Language Reference, 3.2 Standard type hierarchy: "There are also some 'generic' speci

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Terry Reedy
On 6/27/2011 2:33 PM, Terry Reedy wrote: Let me repeat that that is historically wrong for Python, and illustrate why the term 'members' should not be used. From the 1.5 Language Reference, 3.2 Standard type hierarchy: "There are also some 'generic' special attributes, not listed with the indivi

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Terry Reedy
On 6/27/2011 5:42 AM, Michael Foord wrote: On 27/06/2011 09:24, Antoine Pitrou wrote: FWIW, I tend to understand "members" as "methods + attributes", which makes it a nice term to use for that purpose. That is my understanding / use of the terms as well. On 6/27/2011 5:45 AM, Oleg Broytman

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread R. David Murray
On Mon, 27 Jun 2011 20:30:12 +0100, Michael Foord wrote: > On 27/06/2011 20:22, R. David Murray wrote: > > [snip...] > > So, the correct generic term for something that can be accessed > > via attribute notation is attribute. The more specific term for an > > attribute that is a method is method

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
On 27/06/2011 20:22, R. David Murray wrote: [snip...] So, the correct generic term for something that can be accessed via attribute notation is attribute. The more specific term for an attribute that is a method is method. We don't currently have a more specific collective term for attributes t

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread R. David Murray
On Mon, 27 Jun 2011 19:27:26 +0200, Antoine Pitrou wrote: > Le Tue, 28 Jun 2011 00:36:20 +1000, > Nick Coghlan a écrit : > > And no, the fact that methods can be treated as attributes is not a > > minor detail. It is *fundamental* to Python's object model that > > *methods are not a special case

Re: [Python-Dev] Snow Leopard buildbot failing again...

2011-06-27 Thread Bill Janssen
I also find interesting, because it seems a good explanation of why the build slave might go into the zombie state of attempting to reconnect to the master. Bill ___ Python-Dev mailing list Python-Dev@python.org htt

Re: [Python-Dev] Snow Leopard buildbot failing again...

2011-06-27 Thread Bill Janssen
exar...@twistedmatrix.com wrote: > On 05:01 pm, jans...@parc.com 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 >

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Terry Reedy
On 6/27/2011 4:24 AM, Antoine Pitrou wrote: Le Mon, 27 Jun 2011 11:32:32 +1000, Nick Coghlan a écrit : "Members" is a historical relic that is best replaced by "attributes" or "data attributes" if we want to explicitly exclude methods for some reason. "Methods" is a subset of attributes that

Re: [Python-Dev] Snow Leopard buildbot failing again...

2011-06-27 Thread exarkun
On 05:01 pm, jans...@parc.com 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 get this: [snip] T

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Antoine Pitrou
Le Tue, 28 Jun 2011 00:36:20 +1000, Nick Coghlan a écrit : > And no, the fact that methods can be treated as attributes is not a > minor detail. It is *fundamental* to Python's object model that > *methods are not a special case of attribute access*. Uh, and so what? Again, the stdlib docs are d

Re: [Python-Dev] Snow Leopard buildbot failing again...

2011-06-27 Thread Michael Foord
On 27/06/2011 18:01, 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 get this: $ buildsla

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Fred Drake
Egads. Back when I wrote "Members and methods" should just be "attributes". I used quotes to specifically indicate that this applied to the phrase "members and methods", not their separate use. I guess I wasn't obvious enough. The general & Python-historical uses of "members" is unfortunat

[Python-Dev] Snow Leopard buildbot failing again...

2011-06-27 Thread Bill Janssen
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 get this: $ buildslave start ~/buildarea/ /Library/Python/2.6/s

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread R. David Murray
On Mon, 27 Jun 2011 15:27:12 +0100, Michael Foord wrote: > On 27/06/2011 15:08, R. David Murray wrote: > > 'data attributes' can so easily become something else in Python...it > > seems to me that the only real difference between 'data attributes' and > > 'method attributes' in Python is that the

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Bill Janssen
Nick Coghlan wrote: > And no, the fact that methods can be treated as attributes is not a > minor detail. It is *fundamental* to Python's object model that > *methods are not a special case of attribute access*. All attributes > work the same way, it is just the way functions implement the > desc

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Stephen J. Turnbull
Nick Coghlan writes: > And no, the fact that methods can be treated as attributes is not a > minor detail. It is *fundamental* to Python's object model that > *methods are not a special case of attribute access*. That's ambiguous. I assume you mean "just a case of attribute access, and not sp

Re: [Python-Dev] PEP 380 acceptance (was Re: EuroPython Language Summit report)

2011-06-27 Thread renaud
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" tests in the zipfile hosted on Greg's site. Those need to be > refactored into proper unittest or doctest based addit

Re: [Python-Dev] [Python-checkins] peps: Happy Tau Day folks! :)

2011-06-27 Thread Nick Coghlan
On Tue, Jun 28, 2011 at 12:38 AM, Benjamin Peterson wrote: > You're not going to give us the source? Just a teensy error with hg add, tab completion and not checking the diff before committing. Fixed now, though :) Cheers, Nick. -- Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australi

Re: [Python-Dev] [Python-checkins] peps: Happy Tau Day folks! :)

2011-06-27 Thread Benjamin Peterson
2011/6/27 nick.coghlan : > http://hg.python.org/peps/rev/1e3d663c67ee > changeset:   3892:1e3d663c67ee > user:        Nick Coghlan > date:        Tue Jun 28 00:23:57 2011 +1000 > summary: >  Happy Tau Day folks! :) > > files: >  pep-0628.html |  149 ++ You're n

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Nick Coghlan
On Tue, Jun 28, 2011 at 12:27 AM, Michael Foord wrote: > Well perhaps, but where does the language draw the distinction between > attributes and "data attributes" as you all them (a term entirely new to > me)? Only in the descriptor protocol and that term isn't used there > (data-descriptors and n

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Nick Coghlan
On Tue, Jun 28, 2011 at 12:08 AM, R. David Murray wrote: > While I agree that using 'attribute' when only methods are being discussed > would most likely be confusing, and that it can be tricky to clearly > word things when both are being discussed, the existence in the language > of getattr, seta

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
On 27/06/2011 15:08, R. David Murray wrote: On Mon, 27 Jun 2011 09:47:05 +0100, Paul Moore wrote: On 27 June 2011 09:24, Antoine Pitrou wrote: While I know it is technically right, I find it a bit strange to refer to methods as "attributes". We're describing an API, not the inner working of t

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Rob Cliffe
On 27/06/2011 15:08, R. David Murray wrote: Wow, all these people who like 'members', and I can't think of ever using that term in a Python context. While I agree that using 'attribute' when only methods are being discussed would most likely be confusing, and that it can be tricky to clearly wor

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread R. David Murray
On Mon, 27 Jun 2011 09:47:05 +0100, Paul Moore wrote: > On 27 June 2011 09:24, Antoine Pitrou wrote: > > While I know it is technically right, I find it a bit strange to refer to > > methods as "attributes". We're describing an API, not the inner working of > > the object model. Also, people just

Re: [Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Tom Whittock
Hi again. Just to let you know that Greg's suggestion worked beautifully - I guess my id idea was just me trying to make life hard for myself. My concerns over the json modules usage of id seem unjustified, as circular references are detected now that the weak reference dictionary is in place. T

Re: [Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Tom Whittock
Hi Greg thanks for your quick reply. > Perhaps you could use a WeakValueDictionary to keep a mapping > from a C++ object address to its Python proxy. Thank you, I'll implement this and see whether it works out. I'll certainly be better off if it does. I was avoiding holding weak references due to

Re: [Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Greg Ewing
Tom Whittock wrote: Currently every time one of these objects is accessed from Python, a new "myproxy" instance is created. So if I were to access the same field of an object twice, I would receive two python objects proxying the same underlying C++ object. Perhaps you could use a WeakValueDic

Re: [Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Stefan Behnel
Tom Whittock, 27.06.2011 12:48: I'm writing a module to proxy C++ objects into Python for a large C++ application. There are hundreds of thousands of C++ objects, some of which are temporary while others are very long lived. Currently every time one of these objects is accessed from Python, a ne

[Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Tom Whittock
Hi all. I'm writing a module to proxy C++ objects into Python for a large C++ application. There are hundreds of thousands of C++ objects, some of which are temporary while others are very long lived. Currently every time one of these objects is accessed from Python, a new "myproxy" instance is c

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Oleg Broytman
On Mon, Jun 27, 2011 at 10:24:28AM +0200, Antoine Pitrou wrote: > FWIW, I tend to understand "members" as "methods + attributes", which makes > it a nice term to use for that purpose. That's my feeling too. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
On 27/06/2011 09:24, Antoine Pitrou wrote: Le Mon, 27 Jun 2011 11:32:32 +1000, Nick Coghlan a écrit : On Mon, Jun 27, 2011 at 7:52 AM, Terry Reedy wrote: or the 'attribute' substitution everywhere makes sense? No. My strong history-based opinions ;-). +1 to what Terry said. "Members" is

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Paul Moore
On 27 June 2011 09:24, Antoine Pitrou wrote: > While I know it is technically right, I find it a bit strange to refer to > methods as "attributes". We're describing an API, not the inner working of > the object model. Also, people just discovering Python will probably be a > bit surprised if we st

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Antoine Pitrou
Le Mon, 27 Jun 2011 11:32:32 +1000, Nick Coghlan a écrit : > On Mon, Jun 27, 2011 at 7:52 AM, Terry Reedy wrote: > >> or the 'attribute' substitution everywhere makes sense? > > > > No. > > > > My strong history-based opinions ;-). > > +1 to what Terry said. > > "Members" is a historical relic