[issue5880] Remove unneeded "context" pointer from getters and setters

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.9 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue5880] Remove unneeded "context" pointer from getters and setters

2011-03-26 Thread Mark Dickinson
Changes by Mark Dickinson : -- title: test___all__ -> Remove unneeded "context" pointer from getters and setters ___ Python tracker ___ __

[issue5880] Remove unneeded "context" pointer from getters and setters

2011-03-08 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5880] Remove unneeded "context" pointer from getters and setters

2009-05-04 Thread Larry Hastings
Larry Hastings added the comment: Oh, and, I looked at pyephem. It uses the context field to... store an integer. In this case, the offset in a structure where it's going to pull out a value (float or double). This code would probably be clearer if forced to make do without the "closure". --

[issue5880] Remove unneeded "context" pointer from getters and setters

2009-05-04 Thread Larry Hastings
Larry Hastings added the comment: Mark Dickinson: no extension module would ever *need* it. One could reproduce the functionality with stub intermediary functions, as follows: PyObject *my_getter_with_context(PyObject *self, void *context) { /* ... / } PyObject *my_getter_A(PyObject *self)

[issue5880] Remove unneeded "context" pointer from getters and setters

2009-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: I've removed those gratuitous context uses in Objects/longobject.c in r72202 (trunk) and r72203 (py3k). I'm not sure it's a good idea to remove the context field completely. Apart from the compatibility issues that Antoine pointed out, it doesn't seem improba

[issue5880] Remove unneeded "context" pointer from getters and setters

2009-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Doesn't it also break binary compatibility with extension modules? Perhaps this should be quickly discussed on python-dev, although I agree that it looks sensible. -- nosy: +pitrou ___ Python tracker

[issue5880] Remove unneeded "context" pointer from getters and setters

2009-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: I haven't looked at this patch in detail, but I'd be delighted to see those uses of the context in longobject.c disappear. -- nosy: +marketdickinson ___ Python tracker ___

[issue5880] Remove unneeded "context" pointer from getters and setters

2009-04-29 Thread Larry Hastings
Larry Hastings added the comment: Whoops, forgot to categorize the issue before submitting it. -- components: +Interpreter Core type: -> feature request versions: +Python 3.1 ___ Python tracker ___

[issue5880] Remove unneeded "context" pointer from getters and setters

2009-04-29 Thread Larry Hastings
New submission from Larry Hastings : PyGetSetDef has a "void *context" field. This field is passed in to the get and set functions implementing the property. The field is almost never used, so it adds unnecessary complexity. Clearly, YAGNI. There are two places in CPython where it got used: b