/usr/lib/python3/dist-packages/keyring/util/__pycache__
Edit: /usr/lib/python3/dist-packages/keyring/util/__pycache__/properties.cpython-310.pyc (1902B)
o
ÞñÐa- ã @ s. d dl mZ G dd„ deƒZG dd„ dƒZdS )é )Úabcc @ s e Zd ZdZdd„ ZdS )Ú
ClassPropertya™
An implementation of a property callable on a class. Used to decorate a
classmethod but to then treat it like a property.
Example:
>>> class MyClass:
... @ClassProperty
... @classmethod
... def skillz(cls):
... return cls.__name__.startswith('My')
>>> MyClass.skillz
True
>>> class YourClass(MyClass): pass
>>> YourClass.skillz
False
c C s | j d |¡ƒ S ©N)ÚfgetÚ__get__)ÚselfÚclsÚowner© r
ú9/usr/lib/python3/dist-packages/keyring/util/properties.pyr s zClassProperty.__get__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r r
r
r
r r s r c @ s" e Zd ZdZdd„ Zddd„ZdS )ÚNonDataPropertya Much like the property builtin, but only implements __get__,
making it a non-data property, and can be subsequently reset.
See http://users.rcn.com/python/download/Descriptor.htm for more
information.
>>> class X:
... @NonDataProperty
... def foo(self):
... return 3
>>> x = X()
>>> x.foo
3
>>> x.foo = 4
>>> x.foo
4
c C s. |d usJ dƒ‚t |tjƒsJ dƒ‚|| _d S )Nzfget cannot be nonezfget must be callable)Ú
isinstancer ÚCallabler )r r r
r
r Ú__init__1 s
zNonDataProperty.__init__Nc C s |d u r| S | |¡S r )r )r ÚobjÚobjtyper
r
r r 6 s
zNonDataProperty.__get__r )r r
r r r r r
r
r
r r s r N)Úcollectionsr Úpropertyr r r
r
r
r Ú
s