Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Callable modules

Current License: CC BY-SA 4.0

17 events
when toggle format what by license comment
Dec 9, 2025 at 7:38 answer added Azusa Nakano timeline score: 0
Nov 28, 2022 at 17:20 answer added Con O'Leary timeline score: 0
Aug 11, 2021 at 5:44 comment added Limina102 Warning: this trick will make your code not working with tools like Pylint. Everything fails. I guess typing more characters at the end save the time in this case: see libraries like tqdm whose are primarily called with from tqdm import tqdm but they didn't apply this trick.
Aug 3, 2021 at 11:07 answer added Limina102 timeline score: 2
May 5, 2020 at 16:53 answer added Friedrich -- Слава Україні timeline score: 6
Nov 10, 2019 at 22:10 history edited user3064538 CC BY-SA 4.0
added 92 characters in body; edited tags
Mar 14, 2019 at 18:55 answer added Nick Matteo timeline score: 11
Jan 4, 2018 at 17:22 answer added Christoph Boeddeker timeline score: 24
Jul 2, 2010 at 14:16 comment added Roger Pate @Longpoke: Yes, that's what I meant by "import just call".
Jul 2, 2010 at 2:22 comment added L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Not sure what you mean, like from mymodule import __call__ ?
Jul 2, 2010 at 1:43 comment added Roger Pate @Longpoke: It would be cumbersome and inconsistent to import just call. Perhaps I could've phrased that better (when I asked this over a year ago), but it still appears that way to me.
Jul 1, 2010 at 23:07 comment added L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ "Beyond the obvious that it wouldn't be easy to import directly." Why do you think that?
Jun 30, 2009 at 5:18 comment added Roger Pate I had also thought it could simplify some modules such as datetime and decimal, by making the module.__call__ be datetime.datetime or decimal.Decimal respectively. However, then type(decimal('1')) wouldn't be the same as decimal, and possible other issues. shrug It was an idea.
Jun 30, 2009 at 5:15 comment added Roger Pate Migrating a decorator from a package into its own sub-module. @example(...) was by far still the most common use-case, but @example.special_case(...) was a new use. I didn't want to implement it with an example class and static methods, since that was a poor fit. Not sure a callable module is a better fit, but I started investigating it and then wanted to know why it didn't work.
Jun 29, 2009 at 22:20 answer added Alex Martelli timeline score: 111
Jun 29, 2009 at 22:18 answer added Miles timeline score: 47
Jun 29, 2009 at 22:01 history asked Roger Pate CC BY-SA 2.5
toggle format

AltStyle によって変換されたページ (->オリジナル) /