Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting ident causes Exception #5

Closed
JesseBowling opened this issue Feb 19, 2020 · 0 comments
Closed

Setting ident causes Exception #5

JesseBowling opened this issue Feb 19, 2020 · 0 comments

Comments

@JesseBowling
Copy link

Here's a simplified proof:

>>> class Client:
...     def __init__(self, ident=None):
...             if ident:
...                     self.ident = ident
...     @property
...     def ident(self):
...             raise Exception("ident is not set")
... 
>>> client = Client()
>>> client.ident
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 7, in ident
Exception: ident is not set
>>> client = Client(ident="blah")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 4, in __init__
AttributeError: can't set attribute

Any attempts to set an ident results in such an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant