Ticket #478 (closed defect: fixed)
Cython closures not bound as methods
| Reported by: | robertwb | Owned by: | robertwb |
|---|---|---|---|
| Priority: | major | Milestone: | 0.13 |
| Component: | Python Semantics | Keywords: | |
| Cc: |
Description
This is especially relevant to using closures to decorate methods.
sage: class A: ....: foo = lambda *x: x ....: sage: A.foo <unbound method A.<lambda>> sage: A().foo <bound method A.<lambda> of <__main__.A instance at 0xacafee0>> sage: A().foo() (<__main__.A instance at 0xacd8080>,)
Rather than using the method binding trick ourselves, we need to make closures into a class with __call__, __get__, and __set__ methods.
Change History
Note: See
TracTickets for help on using
tickets.
