-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Need to define write way of inheritance
> ncs_pycli
Your maagic object 'root -> (root)' is now prepared... go have some fun!
trans.compare() to see your current transaction
trans.apply() to commit
trans.revert() to revert changes
Maapi object can be found at m
You can restart the transaction and create a fresh root object by invoking new_trans:
In [1]: new_trans
new transaction created
In [1]: class A:
...: x = 10
...:
In [2]: class B(A):
...: def __init__(self):
...: A.__init__(self)
...:
In [3]: b = B()
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
~/.pyenv/versions/3.7.16/lib/python3.7/site-packages/ncs_pycli/ncs_pycli.py in <module>
----> 1 b = B()
~/.pyenv/versions/3.7.16/lib/python3.7/site-packages/ncs_pycli/ncs_pycli.py in __init__(self)
1 class B(A):
2 def __init__(self):
----> 3 A.__init__(self)
4
NameError: name 'A' is not defined
Metadata
Metadata
Assignees
Labels
No labels