Skip to content

Ivoz/calldules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Calldules!

No more from <module> import <Module>!

Wouldn't be nice if...

>>> import pprint
>>> pprint("hello")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable

Was possible? Well:

  1. Add special sauce:

    >>> import calldules
    
  2. Import module(s), call:

    >>> import pprint
    >>> pprint("hello")
    
  3. ????

    'hello'
    
  4. PROFIT!!!

Also works with such modules as flask, codecs, array, datetime, decimal, random, and many more!

No responsibility is taken for any grievous harm caused either by irresponsible or responsible use of calldules.

Inspired by Richard Jones' talk Don't Do This.

About

making modules callable, for not very good reasons.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages