I am new to Python and a bit confused about parameters transfer: I have 2 methods:
def convert(self, ipnb, indices = []):
with self.fopen(ipnb, u'r') as f:
emptyIndicesList = not indices
#some code
def test_read(self):
s = self.convert(self, u'test.ipynb')
#some code
I encounter 2 issues:
If I run the code as is
self.fopen(ipnb, u'r') as fthrows... But if I changewith self.fopen(ipnb, u'r') as ftoself.fopen(u'test.ipynb', u'r') as fit works properlyemptyIndicesListisfalse, I expect it to betrue, since I think that I am using default parameter - empty list What am I missing in parameter transfer? How the above issues should be solved?
Thanks :)