Skip to main content

RODeco a read only function decorator

Project description

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"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for RODeco, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size RODeco-1.1.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page