Browse Source

tests/basics: Add test for assignment of attribute to bound method.

pull/2736/merge
Damien George 8 years ago
parent
commit
1639200e57
  1. 6
      tests/basics/boundmeth1.py

6
tests/basics/boundmeth1.py

@ -22,3 +22,9 @@ print(m(1))
# bound method with lots of extra args
m = A().h
print(m(1, 2, 3, 4, 5, 6))
# can't assign attributes to a bound method
try:
A().f.x = 1
except AttributeError:
print('AttributeError')

Loading…
Cancel
Save