No description
This repository has been archived on 2026-11-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Arzaroth Lekva 7478793480 version number
2015-01-04 22:31:59 +09:00
RODeco that sucked ballz 2015-01-04 22:28:58 +09:00
.gitignore first import 2014-05-02 10:48:42 +02:00
AUTHORS first import 2014-05-02 10:48:42 +02:00
LICENSE first import 2014-05-02 10:48:42 +02:00
README quick of ugly mistake 2014-05-02 11:32:49 +02:00
setup.py version number 2015-01-04 22:31:59 +09:00

RODeco a read only function decorator

Use Cases
---------

Let's say you're using a python module, and you don't like an inner working.
This module allows you to override any function inside a module, at run-time, as long it is not a builtin.

Afterwards, any call to this function, by anyone (you, or the module itself), will use what you defined.

Example
-------

     import os

     os.path.basename('./test') # Will output "test"

     import RODeco

     @RODeco.RODeco(os.path.basename, "_old_basename")
     def newbasename(s):
         return "~/" + _old_basename(s)

     os.path.basename('./test') # Will output "~/test"