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 compl
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
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
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
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' thi
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
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
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 U
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 hel
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'
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 geta
On Fri, Mar 11, 2016 at 11:24 PM, Veek. M wrote:
> Ian Kelly wrote:
>
>> On Fri, Mar 11, 2016 at 10:59 PM, Veek. M 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
On Sat, Mar 12, 2016 at 5:24 PM, Veek. M 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 sam
Ian Kelly wrote:
> On Fri, Mar 11, 2016 at 10: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.
>>
>> But they both do essentially the s
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
>
On Fri, Mar 11, 2016 at 10: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.
>
> But they both do essentially the same thing, allow us to do:
On Sat, Mar 12, 2016 at 4: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.
>
> But they both do essentially the same thing, allow us to do:
>
17 matches
Mail list logo