MonkeeSage wrote:
> what am I missing?
To my eyes, when you write:
>I think it muddies the water to say that a.a() and a.a are the same
>thing--obviously they are not. In the common case, the first is a
>method, and the second is a variable.
What you are most obviously missing is what's shown
MonkeeSage <[EMAIL PROTECTED]> wrote:
> It seems that I've got a short-circuit somewhere here. I understand
> that everything is an object and the the storage/lookup system is
> object-agnostic, and that it is only the descriptors (or "tags" as I
> called them generically) that determine how an at
Steve Howell a écrit :
> --- Jan Claeys <[EMAIL PROTECTED]> wrote:
>
>>To conclude this discussion:
>>
>> * in Python, methods are attributes
>> * in Ruby, attributes are methods
>>
>
>
> So clearly one of the languages has it all wrong. ;)
>
Nope, quite on the contrary, both got it right !-)
Jan Claeys a écrit :
> Op Sun, 09 Dec 2007 12:44:46 -0800, schreef MonkeeSage:
>
>
>>The point is that just because the attributes are "looked up the same
>>way" or whatever, doesn't make them the same *kind* of attribute. To say
>>that all attributes are the same in python muddies the water. The
MonkeeSage a écrit :
> On Dec 10, 7:19 am, Bruno Desthuilliers I'm going to give the "Data Model" section a thorough going-over
> again, and try to pay more attention this time(!) ;)
Also make sure you read the docs about new-style classes, the descriptor
protocol and metaclasses.
> Just as a s
On Dec 10, 7:19 am, Bruno Desthuilliers wrote:
> MonkeeSage a écrit :
>
> > It seems that I've got a short-circuit somewhere here. I understand
> > that everything is an object and the the storage/lookup system is
> > object-agnostic, and that it is only the descriptors (or "tags" as I
> > called
On Mon, 10 Dec 2007 03:56:10 -0800, MonkeeSage wrote:
> So, when I say that all callable attributes (or to be more precise, all
> callable attributes bound to objects other than toplevel) are "methods,"
> what am I missing?
Everything that isn't a method but is callable.
class Callable(object):
MonkeeSage a écrit :
> It seems that I've got a short-circuit somewhere here. I understand
> that everything is an object and the the storage/lookup system is
> object-agnostic, and that it is only the descriptors (or "tags" as I
> called them generically)
"descriptor" is a protocol - an interface
It seems that I've got a short-circuit somewhere here. I understand
that everything is an object and the the storage/lookup system is
object-agnostic, and that it is only the descriptors (or "tags" as I
called them generically) that determine how an attribute is bound,
whether it is bound at all, w
MonkeeSage a écrit :
> On Dec 8, 4:11 pm, Bruno Desthuilliers
(snip)
>>> I think it muddies the water to say that a.a() and a.a are the same
>>> thing--obviously they are not.
>> Indeed. a.a yields the object bound to name 'a' in object a, while a.a()
>> yields the value returned by calling the obj
On Sun, 09 Dec 2007 12:44:46 -0800, MonkeeSage wrote:
> On Dec 8, 4:11 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>> MonkeeSage a écrit :
> You're talking about the result of calling a.a(), I'm talking about
> what the attribute "a" on the object "a" is. Which is a callable
> attribute,
--- Jan Claeys <[EMAIL PROTECTED]> wrote:
>
> To conclude this discussion:
>
> * in Python, methods are attributes
> * in Ruby, attributes are methods
>
So clearly one of the languages has it all wrong. ;)
___
Op Sun, 09 Dec 2007 12:44:46 -0800, schreef MonkeeSage:
> The point is that just because the attributes are "looked up the same
> way" or whatever, doesn't make them the same *kind* of attribute. To say
> that all attributes are the same in python muddies the water. They are
> the same in a generi
On Dec 8, 4:11 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> MonkeeSage a écrit :
>
>
>
> > On Dec 8, 12:56 pm, Bruno Desthuilliers
> > <[EMAIL PROTECTED]> wrote:
>
> >>MonkeeSage a écrit :
>
> >>>On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
> On Fri, 07 Dec 2
Roy Smith a écrit :
> In article <[EMAIL PROTECTED]>,
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
>
>>MonkeeSage a écrit :
(snip)
>>>Bah. Type-by-behavior never impressed me much. And I still think that
>>>a.a is semantically different from a.a() in python.
>>
>>It is indeed and very obvi
In article <[EMAIL PROTECTED]>,
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> MonkeeSage a écrit :
> > On Dec 8, 2:51 pm, Glenn Hutchings <[EMAIL PROTECTED]> wrote:
> >
> >>On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>>I think it muddies the water to say that a.a() a
MonkeeSage a écrit :
> On Dec 8, 2:51 pm, Glenn Hutchings <[EMAIL PROTECTED]> wrote:
>
>>On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
>>
>>
>>>I think it muddies the water to say that a.a() and a.a are the same
>>>thing--obviously they are not.
>>
>>A thing is not what it is;
>>A thing
MonkeeSage a écrit :
> On Dec 8, 12:56 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>>MonkeeSage a écrit :
>>
>>
>>
>>
>>>On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>>
On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
>>
>With properties, attributes a
On Dec 8, 2:51 pm, Glenn Hutchings <[EMAIL PROTECTED]> wrote:
> On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
> > I think it muddies the water to say that a.a() and a.a are the same
> > thing--obviously they are not.
>
> A thing is not what it is;
> A thing is what it does.
> This is t
On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
> I think it muddies the water to say that a.a() and a.a are the same
> thing--obviously they are not.
A thing is not what it is;
A thing is what it does.
This is the Way of the Duck.
-- Basho (in his "3 extra syllables" phase)
--
http
On Dec 8, 4:19 am, [EMAIL PROTECTED] wrote:
> With properties, attributes and methods seem very similar. I was
> wondering what techniques people use to give clues to end users as to
> which 'things' are methods and which are attributes.
Methods are verbs, attributes are nouns :)
--
Roberto Bonv
On Sat, 08 Dec 2007 11:44:36 -0800, MonkeeSage wrote:
> On Dec 8, 12:56 pm, Bruno Desthuilliers
>> callable attributes are not necessarily methods, and are still
>> 'variables' anyway.
>
> I think it muddies the water to say that a.a() and a.a are the same
> thing--obviously they are not. In the
On Dec 8, 12:56 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> MonkeeSage a écrit :
>
>
>
> > On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
> >>On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
>
> >>>With properties, attributes and methods seem very similar. I wa
MonkeeSage a écrit :
> On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
>>On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
>>
>>>With properties, attributes and methods seem very similar. I was
>>>wondering what techniques people use to give clues to end users as to
>>>w
[EMAIL PROTECTED] a écrit :
> Hi,
>
> With properties, attributes and methods seem very similar. I was
> wondering what techniques people use to give clues to end users as to
> which 'things' are methods and which are attributes.
Documentation.
> With ipython, I
> use tab completion all the ti
On Dec 8, 6:50 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Sat, 08 Dec 2007 00:34:06 -0800, MonkeeSage wrote:
> > I think he means callable attributes (methods) and non-callable
> > attributes (variables).
>
> But not every callable attribute is a method.
>
> Ciao,
> Marc '
On Sat, 08 Dec 2007 00:34:06 -0800, MonkeeSage wrote:
> I think he means callable attributes (methods) and non-callable
> attributes (variables).
But not every callable attribute is a method.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi,
>
> With properties, attributes and methods seem very similar. I was
> wondering what techniques people use to give clues to end users as to
> which 'things' are methods and which are attributes. With ipython, I
> use tab completion all the time, but I can rarely t
On Dec 8, 2:10 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
> > With properties, attributes and methods seem very similar. I was
> > wondering what techniques people use to give clues to end users as to
> > which 'things' are methods
On Fri, 07 Dec 2007 23:19:40 -0800, tjhnson wrote:
> With properties, attributes and methods seem very similar. I was
> wondering what techniques people use to give clues to end users as to
> which 'things' are methods and which are attributes.
Methods are attributes. So the decision is easy --
Hi,
With properties, attributes and methods seem very similar. I was
wondering what techniques people use to give clues to end users as to
which 'things' are methods and which are attributes. With ipython, I
use tab completion all the time, but I can rarely tell from the names
alone whether it i
31 matches
Mail list logo