Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108745
| From | Dirk Bächle <tshortik@gmx.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Design: Idiom for classes and methods that are customizable by the user? |
| Date | 2016-05-17 16:51 +0200 |
| Message-ID | <mailman.63.1463497837.19823.python-list@python.org> (permalink) |
| References | <5734ECDF.7070006@gmx.de> <mailman.617.1463087060.32212.python-list@python.org> <dplassFelugU1@mid.individual.net> <CAGgTfkPeqybAeqXLq8FHyRSb+d8KLemvxLrk8i3PfbWdwV4rBA@mail.gmail.com> <573B300A.5080502@gmx.de> |
Hi Michael, and thanks a lot for chiming in on this topic. On 13.05.2016 22:33, Michael Selik wrote: > >> [...] >> > I share Greg's trepidation when I hear a phrase like that, but the general > idea of a registry of classes or functions and then picking the right one > based on string input is fine. > See my answer to Gregory, addressing his concerns. ;) > How would the API work for custom Taskmasters? It's not so great to require > that the user must explicitly ``add`` their derived class after defining > it. Perhaps that add function could be a decorator? > Our current API doesn't use decorators at all, since it's also aimed at people with no (or only some) knowledge of Python. Until a year or so ago, we have been backwards compatible down to Python 1.5.2...and then to Python 2.4 for some time. Only during the last two months we made a clear cut and are now seeing Python 2.7 as our floor to further develop from. So to some degree, decorators were technically not possible to support...and would have looked strange to the average user perhaps? We're now free to add them into the mix for our new Python 2.7.x/3.y codebase, but this would probably require an API discussion first. However, I'll keep the "decorator" idea in mind when I get back to putting "all the dots on the i" for the interface. Best regards, Dirk
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Design: Idiom for classes and methods that are customizable by the user? Dirk Bächle <tshortik@gmx.de> - 2016-05-12 22:51 +0200
Re: Design: Idiom for classes and methods that are customizable by the user? Marko Rauhamaa <marko@pacujo.net> - 2016-05-13 01:01 +0300
Re: Design: Idiom for classes and methods that are customizable by the user? Dirk Bächle <tshortik@gmx.de> - 2016-05-13 00:42 +0200
Re: Design: Idiom for classes and methods that are customizable by the user? Marko Rauhamaa <marko@pacujo.net> - 2016-05-13 08:53 +0300
Re: Design: Idiom for classes and methods that are customizable by the user? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-13 18:35 +1200
Re: Design: Idiom for classes and methods that are customizable by the user? Michael Selik <michael.selik@gmail.com> - 2016-05-13 20:33 +0000
Re: Design: Idiom for classes and methods that are customizable by the user? Dirk Bächle <tshortik@gmx.de> - 2016-05-17 16:51 +0200
Re: Design: Idiom for classes and methods that are customizable by the user? Michael Selik <michael.selik@gmail.com> - 2016-05-17 18:13 +0000
csiph-web