from datetime import date
from dateutil.relativedelta import relativedelta
one_month = date.today() + relativedelta(months=-1)
каким-то магическим образом становятся равныа основы переменных в питоне
def test(a):
start = 0
result = []
for i, item in enumerate(a[1:]):
if not item.replace('.', '', 1).isdigit(): # to handle float
end = i
result.append(a[start:end + 1])
start = end + 1
result.append(a[start:])
return result
w
. Код:def a():
import pdb; pdb.set_trace() # debug: GMO
return 1
def b():
return a()
def c():
return b()
if __name__ == "__main__":
c()
❯ python test.py
> /home/yskhlyan/projects/wallet/wallet/test.py(3)a()
2 import ipdb; ipdb.set_trace() # debug: GMO
----> 3 return 1
4
ipdb> w
/home/yskhlyan/projects/wallet/wallet/test.py(12)<module>()
10
11 if __name__ == "__main__":
---> 12 c()
/home/yskhlyan/projects/wallet/wallet/test.py(9)c()
8 def c():
----> 9 return b()
10
/home/yskhlyan/projects/wallet/wallet/test.py(6)b()
5 def b():
----> 6 return a()
7
> /home/yskhlyan/projects/wallet/wallet/test.py(3)a()
2 import ipdb; ipdb.set_trace() # debug: GMO
----> 3 return 1
4
ipdb> c