© Copyright 2000-2020 Source Code Online. Free Source Code and Scripts Downloads.
|Code Listing by Shannon -jj Behrens|
This is like the object oriented concept of extending a super
class. However, instead of starting at the furthest subclass and working your
way up, you start at the top super class and work your way down.
In some code I have to work with but don't have much control over,
there are a bunch of strings declared at the module level. I need to figure
out what all those strings are, and wrap them in something. Once they are
protect_utf8 is a function decorator that can prevent naive
functions from breaking UTF-8.
A million things can go wrong, and there are several ways to
succeed. You want to check for the ways that can succeed and continue on as
soon as one of them does. You want the non-local flow of control that
exceptions provide, but...
This is a trivial calculator "shell" with a running total.
As trivial as it is, I find it to be more useful than a normal calculator when
doing my checkbook because of the ever-present running total.
Sed is to Vi...
If you have an instance "db", then accessing "db.Foo"
automatically imports, instantiates, caches, and returns an instance of "Foo"
from the "db" package.
Hack a class's __init__ method without subclassing the class
because a) you can't modify the original class and b) you can't modify other
classes already using the first class. This is a gross hack that should only
be used to work...
Permit anyone to add methods to a class in a library without having
to change the name of the class by subclassing. This is like having a plugins
directory. Also, given a normal function, treat it as a method of an arbitrary
This is a convenient way to deeply nest try/finally statements.
This is a proxy for an instance of some class called Foo. Any
thread can use the one proxy, and the proxy will automatically look up the
thread specific instance of Foo. This is great if you have a global function
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.