Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104670 > unrolled thread
| Started by | "Veek. M" <vek.m1234@gmail.com> |
|---|---|
| First post | 2016-03-12 11:29 +0530 |
| Last post | 2016-03-16 08:15 -0700 |
| Articles | 18 — 7 participants |
Back to article view | Back to comp.lang.python
Descriptors vs Property "Veek. M" <vek.m1234@gmail.com> - 2016-03-12 11:29 +0530
Re: Descriptors vs Property Chris Angelico <rosuav@gmail.com> - 2016-03-12 17:05 +1100
Re: Descriptors vs Property Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-11 23:12 -0700
Re: Descriptors vs Property "Veek. M" <vek.m1234@gmail.com> - 2016-03-12 11:54 +0530
Re: Descriptors vs Property Chris Angelico <rosuav@gmail.com> - 2016-03-12 17:35 +1100
Re: Descriptors vs Property Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-11 23:37 -0700
Re: Descriptors vs Property "Veek. M" <vek.m1234@gmail.com> - 2016-03-12 11:50 +0530
Re: Descriptors vs Property Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-12 18:13 +0100
Re: Descriptors vs Property "Veek. M" <vek.m1234@gmail.com> - 2016-03-13 12:48 +0530
Re: Descriptors vs Property Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-13 10:25 +0100
Re: Descriptors vs Property "Veek. M" <vek.m1234@gmail.com> - 2016-03-13 15:26 +0530
Re: Descriptors vs Property Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-13 11:35 +0100
Re: Descriptors vs Property "Veek. M" <vek.m1234@gmail.com> - 2016-03-13 18:50 +0530
Re: Descriptors vs Property Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-13 19:15 +0100
Re: Descriptors vs Property Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-14 15:34 +0000
Re: Descriptors vs Property Rustom Mody <rustompmody@gmail.com> - 2016-03-14 10:16 -0700
Re: Descriptors vs Property Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-16 01:53 +0100
Re: Descriptors vs Property Ethan Furman <ethan@stoneleaf.us> - 2016-03-16 08:15 -0700
| From | "Veek. M" <vek.m1234@gmail.com> |
|---|---|
| Date | 2016-03-12 11:29 +0530 |
| Subject | Descriptors vs Property |
| Message-ID | <nc0b1u$ckq$1@dont-email.me> |
A property uses the @property decorator and has @foo.setter
@foo.deleter.
A descriptor follows the descriptor protocol and implements the __get__
__set__ __delete__ methods.
But they both do essentially the same thing, allow us to do:
foo = 10
del foo
x = foo
So why do we have two ways of doing this?
Also,
#####################
class TypedProperty(object):
def __init__(self,name,type,default=None):
self.name = "_" + name
self.type = type
self.default = default if default else type()
def __get__(self,instance,cls):
return getattr(instance,self.name,self.default)
def __set__(self,instance,value):
if not isinstance(value,self.type):
raise TypeError("Must be a %s" % self.type)
setattr(instance,self.name,value)
def __delete__(self,instance):
raise AttributeError("Can't delete attribute")
class Foo(object):
name = TypedProperty("name",str)
num = TypedProperty("num",int,42)
In this example, the class TypedProperty defines a descriptor where type
checking is
performed when the attribute is assigned and an error is produced if an
attempt is made
to delete the attribute. For example:
f = Foo()
a = f.name # Implicitly calls Foo.name.__get__(f,Foo)
f.name = "Guido" # Calls Foo.name.__set__(f,"Guido")
del f.name # Calls Foo.name.__delete__(f)
##################################
I didn't follow this. Foo is a composition of TypedProperty.
You've got a 'Foo' type with two attributes 'name' and 'num'.
When you do f.name you are actually doing:
f.name.__get__(self, instance, cls)
What the heck??
I didn't follow this example at all.. What is he doing in there?
Also, what's this bit:
self.default = default if default else type()
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-03-12 17:05 +1100 |
| Message-ID | <mailman.25.1457762756.12893.python-list@python.org> |
| In reply to | #104670 |
On Sat, Mar 12, 2016 at 4:59 PM, Veek. M <vek.m1234@gmail.com> wrote: > A property uses the @property decorator and has @foo.setter > @foo.deleter. > > A descriptor follows the descriptor protocol and implements the __get__ > __set__ __delete__ methods. > > But they both do essentially the same thing, allow us to do: > foo = 10 > del foo > x = foo > > So why do we have two ways of doing this? The descriptor protocol is what powers the @property decorator. It's like asking why we have both lists and sequences; the sequence protocol is how you interact with lists. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-03-11 23:12 -0700 |
| Message-ID | <mailman.26.1457763193.12893.python-list@python.org> |
| In reply to | #104670 |
On Fri, Mar 11, 2016 at 10:59 PM, Veek. M <vek.m1234@gmail.com> wrote:
> A property uses the @property decorator and has @foo.setter
> @foo.deleter.
>
> A descriptor follows the descriptor protocol and implements the __get__
> __set__ __delete__ methods.
>
> But they both do essentially the same thing, allow us to do:
> foo = 10
> del foo
> x = foo
>
> So why do we have two ways of doing this?
Properties *are* descriptors. Properties just provide a more natural
syntax for a very common case.
> Also,
> #####################
> class TypedProperty(object):
> def __init__(self,name,type,default=None):
> self.name = "_" + name
> self.type = type
> self.default = default if default else type()
>
> def __get__(self,instance,cls):
> return getattr(instance,self.name,self.default)
>
> def __set__(self,instance,value):
> if not isinstance(value,self.type):
> raise TypeError("Must be a %s" % self.type)
> setattr(instance,self.name,value)
>
> def __delete__(self,instance):
> raise AttributeError("Can't delete attribute")
>
> class Foo(object):
> name = TypedProperty("name",str)
> num = TypedProperty("num",int,42)
>
> In this example, the class TypedProperty defines a descriptor where type
> checking is
> performed when the attribute is assigned and an error is produced if an
> attempt is made
> to delete the attribute. For example:
>
> f = Foo()
> a = f.name # Implicitly calls Foo.name.__get__(f,Foo)
> f.name = "Guido" # Calls Foo.name.__set__(f,"Guido")
> del f.name # Calls Foo.name.__delete__(f)
> ##################################
>
> I didn't follow this. Foo is a composition of TypedProperty.
> You've got a 'Foo' type with two attributes 'name' and 'num'.
> When you do f.name you are actually doing:
> f.name.__get__(self, instance, cls)
More accurately, you're doing
f.__class__.__dict__['name'].__get__(self, instance, cls). But yes,
this is how the descriptor protocol works.
> What the heck??
>
> I didn't follow this example at all.. What is he doing in there?
> Also, what's this bit:
> self.default = default if default else type()
If the default parameter has a truthy value, it gets set to
self.default. Otherwise, the type parameter is called with no
arguments, and the resulting instance is used as self.default instead.
[toc] | [prev] | [next] | [standalone]
| From | "Veek. M" <vek.m1234@gmail.com> |
|---|---|
| Date | 2016-03-12 11:54 +0530 |
| Message-ID | <nc0cgs$fvn$2@dont-email.me> |
| In reply to | #104673 |
Ian Kelly wrote:
> On Fri, Mar 11, 2016 at 10:59 PM, Veek. M <vek.m1234@gmail.com> wrote:
>> A property uses the @property decorator and has @foo.setter
>> @foo.deleter.
>>
>> A descriptor follows the descriptor protocol and implements the
>> __get__ __set__ __delete__ methods.
>>
>> But they both do essentially the same thing, allow us to do:
>> foo = 10
>> del foo
>> x = foo
>>
>> So why do we have two ways of doing this?
>
> Properties *are* descriptors. Properties just provide a more natural
> syntax for a very common case.
>
>> Also,
>> #####################
>> class TypedProperty(object):
>> def __init__(self,name,type,default=None):
>> self.name = "_" + name
>> self.type = type
>> self.default = default if default else type()
>>
>> def __get__(self,instance,cls):
>> return getattr(instance,self.name,self.default)
>>
>> def __set__(self,instance,value):
>> if not isinstance(value,self.type):
>> raise TypeError("Must be a %s" % self.type)
>> setattr(instance,self.name,value)
>>
>> def __delete__(self,instance):
>> raise AttributeError("Can't delete attribute")
>>
>> class Foo(object):
>> name = TypedProperty("name",str)
>> num = TypedProperty("num",int,42)
>>
>> In this example, the class TypedProperty defines a descriptor where
>> type checking is
>> performed when the attribute is assigned and an error is produced if
>> an attempt is made
>> to delete the attribute. For example:
>>
>> f = Foo()
>> a = f.name # Implicitly calls Foo.name.__get__(f,Foo)
>> f.name = "Guido" # Calls Foo.name.__set__(f,"Guido")
>> del f.name # Calls Foo.name.__delete__(f)
>> ##################################
>>
>> I didn't follow this. Foo is a composition of TypedProperty.
>> You've got a 'Foo' type with two attributes 'name' and 'num'.
>> When you do f.name you are actually doing:
>> f.name.__get__(self, instance, cls)
>
> More accurately, you're doing
> f.__class__.__dict__['name'].__get__(self, instance, cls). But yes,
> this is how the descriptor protocol works.
thanks okay i'll read that and get back
>
>> What the heck??
>>
>> I didn't follow this example at all.. What is he doing in there?
>> Also, what's this bit:
>> self.default = default if default else type()
>
> If the default parameter has a truthy value, it gets set to
> self.default. Otherwise, the type parameter is called with no
> arguments, and the resulting instance is used as self.default instead.
But type() just gives me:
TypeError: type() takes 1 or 3 arguments
on py2,3
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-03-12 17:35 +1100 |
| Message-ID | <mailman.27.1457764543.12893.python-list@python.org> |
| In reply to | #104675 |
On Sat, Mar 12, 2016 at 5:24 PM, Veek. M <vek.m1234@gmail.com> wrote: >> Also, what's this bit: >> self.default = default if default else type() > But type() just gives me: > TypeError: type() takes 1 or 3 arguments > on py2,3 Check out the context of the original line of code and see what it's doing. It isn't the same as "type()" in a bare context. ChrisA'
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-03-11 23:37 -0700 |
| Message-ID | <mailman.28.1457764672.12893.python-list@python.org> |
| In reply to | #104675 |
On Fri, Mar 11, 2016 at 11:24 PM, Veek. M <vek.m1234@gmail.com> wrote: > Ian Kelly wrote: > >> On Fri, Mar 11, 2016 at 10:59 PM, Veek. M <vek.m1234@gmail.com> wrote: >>> Also, what's this bit: >>> self.default = default if default else type() >> >> If the default parameter has a truthy value, it gets set to >> self.default. Otherwise, the type parameter is called with no >> arguments, and the resulting instance is used as self.default instead. > > But type() just gives me: > TypeError: type() takes 1 or 3 arguments > on py2,3 You're using the built-in type. In the example, type is the name of one of the arguments, so its value is whatever was passed in. Presumably it's meant to be the type that is being checked, and the result of calling it with no arguments is meant to be a default instance of that type. This is not a particularly great example, to be honest. It shadows a builtin, it makes unwarranted assumptions about the passed-in type, and the "default if default else type()" expression does not account for the possibility that the user might actually want to pass in a default that evaluates as false.
[toc] | [prev] | [next] | [standalone]
| From | "Veek. M" <vek.m1234@gmail.com> |
|---|---|
| Date | 2016-03-12 11:50 +0530 |
| Message-ID | <nc0c8o$fvn$1@dont-email.me> |
| In reply to | #104670 |
Veek. M wrote:
> A property uses the @property decorator and has @foo.setter
> @foo.deleter.
>
> A descriptor follows the descriptor protocol and implements the
> __get__ __set__ __delete__ methods.
>
> But they both do essentially the same thing, allow us to do:
> foo = 10
> del foo
> x = foo
>
> So why do we have two ways of doing this?
>
>
> Also,
> #####################
> class TypedProperty(object):
> def __init__(self,name,type,default=None):
> self.name = "_" + name
> self.type = type
> self.default = default if default else type()
>
> def __get__(self,instance,cls):
> return getattr(instance,self.name,self.default)
>
> def __set__(self,instance,value):
> if not isinstance(value,self.type):
> raise TypeError("Must be a %s" % self.type)
> setattr(instance,self.name,value)
>
> def __delete__(self,instance):
> raise AttributeError("Can't delete attribute")
>
> class Foo(object):
> name = TypedProperty("name",str)
> num = TypedProperty("num",int,42)
>
> In this example, the class TypedProperty defines a descriptor where
> type checking is
> performed when the attribute is assigned and an error is produced if
> an attempt is made
> to delete the attribute. For example:
>
> f = Foo()
> a = f.name # Implicitly calls Foo.name.__get__(f,Foo)
> f.name = "Guido" # Calls Foo.name.__set__(f,"Guido")
> del f.name # Calls Foo.name.__delete__(f)
> ##################################
>
> I didn't follow this. Foo is a composition of TypedProperty.
> You've got a 'Foo' type with two attributes 'name' and 'num'.
> When you do f.name you are actually doing:
> f.name.__get__(self, instance, cls)
> What the heck??
As in, why is he passing instance, cls and who is populating those vars?
When you do f.name you just have self to pass into
name.__whatever__(self)
I haven't read the descriptor protocol as yet.
> self.default = default if default else type()
I don't understand how he's using type() like that or what it returns.
Is it None? Why would type() return None when one can use that directly.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-03-12 18:13 +0100 |
| Message-ID | <6979634.CGS0JZJfMg@PointedEars.de> |
| In reply to | #104674 |
Veek. M wrote:
> Veek. M wrote:
>> class TypedProperty(object):
>> def __init__(self,name,type,default=None):
>> self.name = "_" + name
>> self.type = type
>> self.default = default if default else type()
>>
>> def __get__(self,instance,cls):
>> return getattr(instance,self.name,self.default)
>> […]
>> class Foo(object):
>> name = TypedProperty("name",str)
>> num = TypedProperty("num",int,42)
>> […]
>> When you do f.name you are actually doing:
>>
>> f.name.__get__(self, instance, cls)
Correct.
>> What the heck??
> As in, why is he passing instance, cls and who is populating those vars?
RTFM:
<https://docs.python.org/3/reference/datamodel.html?highlight=__get__#implementing-descriptors>
> When you do f.name you just have self to pass into
> name.__whatever__(self)
No.
> I haven't read the descriptor protocol as yet.
You should. You should also trim your quotations to the relevant minimum,
and post using your real name.
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Veek. M" <vek.m1234@gmail.com> |
|---|---|
| Date | 2016-03-13 12:48 +0530 |
| Message-ID | <nc3427$gv7$1@dont-email.me> |
| In reply to | #104718 |
Thomas 'PointedEars' Lahn wrote: >> I haven't read the descriptor protocol as yet. > > You should. You should also trim your quotations to the relevant > minimum, and post using your real name. > I don't take advice from people on USENET who DON'T have a long history of helping ME - unless I'm blatantly wrong to the point that someone might actually die :) but thanks anyhow I shall endeavor to oblige.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-03-13 10:25 +0100 |
| Message-ID | <3325370.529uYVGlsE@PointedEars.de> |
| In reply to | #104749 |
Veek. M wrote:
> Thomas 'PointedEars' Lahn wrote:
>>> I haven't read the descriptor protocol as yet.
>> You should. You should also trim your quotations to the relevant
>> minimum, and post using your real name.
>
> I don't take advice from people on USENET who DON'T have a long history
> of helping ME -
Although I had no obligation to (this is not a support forum), I have helped
you; you just have not realized that yet. (My posting consisted of more
than you quoted from it.)
> unless I'm blatantly wrong
You are.
> […] but thanks anyhow I shall endeavor to oblige.
Nobility lies in action, not in name.
—Surak
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Veek. M" <vek.m1234@gmail.com> |
|---|---|
| Date | 2016-03-13 15:26 +0530 |
| Message-ID | <nc3dav$cc1$1@dont-email.me> |
| In reply to | #104750 |
Thomas 'PointedEars' Lahn wrote: > Veek. M wrote: > >> Thomas 'PointedEars' Lahn wrote: >>>> I haven't read the descriptor protocol as yet. >>> You should. You should also trim your quotations to the relevant >>> minimum, and post using your real name. >> >> I don't take advice from people on USENET who DON'T have a long >> history of helping ME - > > Although I had no obligation to (this is not a support forum), I have > helped > you; you just have not realized that yet. (My posting consisted of > more than you quoted from it.) I understand - please kill-file-me/ignore-me if possible: http://arstechnica.com/science/2014/02/science-confirms-online-trolls-are-horrible-people-also-sadists/ >> unless I'm blatantly wrong > > You are. > okay :) ------------------------ http://www.thecodingforums.com/threads/examples-of-ecmascipt-written-by-thomas-lahn.937812/ Examples of ECMAScipt written by Thomas Lahn Thomas is the forums best known critic of everyone else's attempts at writing ECMAscript. I was wondering if there is a webspace where we could look and wonder at Thomas's scripting skills. Steve, Dec 5, 2008 ----------------------- (i'm not wondering - we don't get along - matter of taste - kill-file plz)
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-03-13 11:35 +0100 |
| Message-ID | <1786733.1i4GdmWHOk@PointedEars.de> |
| In reply to | #104752 |
Veek. M wrote:
> ------------------------
> http://www.thecodingforums.com/threads/examples-of-ecmascipt-written-by-thomas-lahn.937812/
>
> Examples of ECMAScipt written by Thomas Lahn
>
> Thomas is the forums best known critic of everyone else's attempts at
> writing ECMAscript. I was wondering if there is a webspace where we
> could look and wonder at Thomas's scripting skills.
>
> Steve, Dec 5, 2008
> -----------------------
Obviously you have no reasonable arguments, and not a shred of decency in
you left, so you think that all is left to you to save what you think is
your honor is to commit libel, thereby actively sacrificing what little
honor you had left.
> (i'm not wondering - we don't get along - matter of taste -
It is not a matter of taste. Your behavior is *objectively* despicable.
> kill-file plz)
I am not making it easy for you to be hypocritical and impudent:
>>> […] but thanks anyhow I shall endeavor to oblige.
^^^^^^^^^^^^^^^^^^^^^^^^^^
>> Nobility lies in action, not in name.
>> —Surak
q.e.d.
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Veek. M" <vek.m1234@gmail.com> |
|---|---|
| Date | 2016-03-13 18:50 +0530 |
| Message-ID | <nc3pa1$mm1$1@dont-email.me> |
| In reply to | #104754 |
Thomas 'PointedEars' Lahn wrote: >>> Nobility lies in action, not in name. >>> —Surak Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad to say I like/trust Ned a bit so *huggles* to you, and I shall snip. Also, sorry about the 'Steve' thing - bit shady dragging in crap from elsewhere but my reputation here is not sterling (too many Q not many A), so I tend to defend it willy-nilly. Sorry for the excess BP I may have caused as well. One more *huggles* to you. All the huggling doesn't imply i trust you etc etc. Ah umm.. anyway :p ciao till my next Q
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-03-13 19:15 +0100 |
| Message-ID | <6208300.Zj4Y0DgtCu@PointedEars.de> |
| In reply to | #104765 |
Veek. M wrote: > Thomas 'PointedEars' Lahn wrote: >>>> Nobility lies in action, not in name. >>>> —Surak > > Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad > to say I like/trust Ned a bit so *huggles* to you, and I shall snip. > > Also, sorry about the 'Steve' thing - bit shady dragging in crap from > elsewhere but my reputation here is not sterling (too many Q not many > A), so I tend to defend it willy-nilly. Sorry for the excess BP I may > have caused as well. One more *huggles* to you. > > All the huggling doesn't imply i trust you etc etc. Ah umm.. anyway :p > ciao till my next Q I prefer not to be hugged by people who I do not know personally, but I accept what I consider your serious attempt at an apology. Until next time, hopefully more on topic, then, -- PointedEars (F'up2 poster) Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2016-03-14 15:34 +0000 |
| Message-ID | <mailman.110.1457969751.12893.python-list@python.org> |
| In reply to | #104765 |
On 13/03/2016 13:20, Veek. M wrote: > Thomas 'PointedEars' Lahn wrote: > >>>> Nobility lies in action, not in name. >>>> —Surak > > Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad > to say I like/trust Ned a bit so *huggles* to you, and I shall snip. > > Also, sorry about the 'Steve' thing - bit shady dragging in crap from > elsewhere but my reputation here is not sterling (too many Q not many > A), so I tend to defend it willy-nilly. Sorry for the excess BP I may > have caused as well. One more *huggles* to you. > > All the huggling doesn't imply i trust you etc etc. Ah umm.. anyway :p > ciao till my next Q > Please ignore 'PointedEars', every month or so for some weird reason he complains about people not using their real names. Why? I've no idea, but I suggest that you don't ask him or we'll be here until Doomsday. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2016-03-14 10:16 -0700 |
| Message-ID | <5e7c0ec7-e124-4ccd-9941-692194544f14@googlegroups.com> |
| In reply to | #104829 |
On Monday, March 14, 2016 at 9:06:01 PM UTC+5:30, Mark Lawrence wrote: > On 13/03/2016 13:20, Veek. M wrote: > > Thomas 'PointedEars' Lahn wrote: > > > >>>> Nobility lies in action, not in name. > >>>> --Surak > > > > Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad > > to say I like/trust Ned a bit so *huggles* to you, and I shall snip. > > > > Also, sorry about the 'Steve' thing - bit shady dragging in crap from > > elsewhere but my reputation here is not sterling (too many Q not many > > A), so I tend to defend it willy-nilly. Sorry for the excess BP I may > > have caused as well. One more *huggles* to you. > > > > All the huggling doesn't imply i trust you etc etc. Ah umm.. anyway :p > > ciao till my next Q > > > > Please ignore 'PointedEars', every month or so for some weird reason he > complains about people not using their real names. Why? I've no idea, > but I suggest that you don't ask him or we'll be here until Doomsday. Anyhow what's a 'real name'?? Why is the name my friends call me by more/less real than the one my parents call me? And even parents keep changing their preferences -- nicknames etc! Yeah there is a name on my passport stamped by some government (so-called)... What of it? If we apply Thomas' own aphorism -- Nobility lies in action, not in name -- hardly any government would pass. What of people who dont have passports/bank accounts etc? http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ Not to mention that when a genuine malign-intent change of name is effected it is certain to 'pass' the real name test
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-03-16 01:53 +0100 |
| Message-ID | <5102717.3L5a8dEDES@PointedEars.de> |
| In reply to | #104829 |
Mark Lawrence wrote: > Please ignore 'PointedEars', Please ignore Mark Lawrence unless he has something on-topic to say. How does that feel, Mark? > every month or so for some weird reason The reason being obviously that the people to whose postings I happen to post a follow-up to do not post using their real names. It has nothing at all to do with timing. > he complains about people not using their real names. Why? I've no idea, I have told you already, but you did not listen. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2016-03-16 08:15 -0700 |
| Message-ID | <mailman.215.1458141311.12893.python-list@python.org> |
| In reply to | #104670 |
On 03/11/2016 09:59 PM, Veek. M wrote: > A property uses the @property decorator and has @foo.setter > @foo.deleter. > > A descriptor follows the descriptor protocol and implements the __get__ > __set__ __delete__ methods. `property` is a descriptor combined with a decorator, so is a little more complex to understand. -- ~Ethan~
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web