Created
May 2, 2021 13:12
-
-
Save ofelix03/4d38a9385b2424a5a7538f40c93c0a57 to your computer and use it in GitHub Desktop.
class-instantiation
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
| class Book(object): | |
| def __init__(self, name=None, isbn=None, published_date=None, author=None): | |
| self.name = name | |
| self.isbn = isbn | |
| self.author = author | |
| # first instance of Book class | |
| refactoring_book = Book(name='Refactor', isbn='978-0201485677') | |
| # second instance of Book class | |
| peaa_book = Book(name='Patterns of Enterprise Application Architecture', isbn='978-0321127426') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment