Skip to content

Instantly share code, notes, and snippets.

@leangaurav
Last active July 20, 2019 21:47
Show Gist options
  • Save leangaurav/2774628caf30f952ca0302ffa3e62d56 to your computer and use it in GitHub Desktop.
Save leangaurav/2774628caf30f952ca0302ffa3e62d56 to your computer and use it in GitHub Desktop.

Test Code

from wings import *
w = Wings()
c = ChickenWings()
c.__class__, w.__class__ = w.__class__, c.__class__

print(w.__dict__)
print(c.__dict__)
print(c.price)
print(w.price)

Output
{}
{'price': 100}
100
Traceback (most recent call last):
File "wings_test.py", line 10, in
print(w.price)
AttributeError: 'ChickenWings' object has no attribute 'price'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment