3 ms·
the best feature I love in python is: s = someobj() ref1 = s.doOne ref2 = s.doTwo // then later ref1(arg1,arg2) ref2() In Java you need to code li
by p0w3n3d 1y ago
the best feature I love in python is:
s = someobj()
ref1 = s.doOne
ref2 = s.doTwo
// then later
ref1(arg1,arg2)
ref2()
In Java you need to code like a crazy to have similar results. Also
m = someclas.doThree
// later
o = someclas()
o2 = someclas()
for i in [o,o2]:
m(i)
so many patterns done easy and the right way