Dusty Phillips

Dusty Phillips is a Canadian freelance software developer, teacher, martial artist, and open source aficionado. He is closely affiliated with the Arch Linux community and other open source projects. He maintains the Arch Linux storefronts and has compiled the Arch Linux Handbook. Dusty holds a master's degree in computer science, with specialization in Human Computer Interaction. He currently has six different Python interpreters installed on his computer.

Idézetek

DDaudalagididézett2 évvel ezelőtt
Finally, we have the property declaration at the bottom. This is the magic. It creates a new attribute on the Color class called name, which now replaces the previous name attribute. It sets this attribute to be a property, which calls the two methods we just created whenever the property is accessed or changed.
DDaudalagididézett2 évvel ezelőtt
Think of the property function as returning an object that proxies any requests to set or access the attribute value through the methods we have specified. The property keyword is like a constructor for such an object, and that object is set as the public facing member for the given attribute.
DDaudalagididézett2 évvel ezelőtt
Abstract base classes, or ABCs, define a set of methods and properties that a class must implement in order to be considered a duck-type instance of that class.
fb2epub
Húzza és ejtse ide a fájljait (egyszerre maximum 5-öt)