Created
June 9, 2022 17:09
-
-
Save StephenFordham/1a22824d4457febb14262616a6f7a412 to your computer and use it in GitHub Desktop.
__setattr__catching_exceptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e1 = Employees(46347832, 30, 'Bournemouth') | |
for key, value in e1.__dict__.items(): | |
print('{}: {}'.format(key, value)) | |
#Console output | |
TypeError: Only valid attributes of type string are accepted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment