© Copyright 2000-2015 Source Code Online. Free Source Code and Scripts Downloads.
|Code Listing by nosklo|
Have you wished for a completely Dummy object, one that you can do whatever you want to it? One you can return and all expressions will work?
Hmm.. ok. But here it is anyway.
As subclassing list has a problem when using __getitem__, __delitem__ and __setitem__ methods with slices (they don't get called because parent implements __getslice__, __delslice__ and __setslice__ respectively), I've coded this UserList class...
Finally! This code allows you to import any activestate recipe right into your code!
>>> from activestate.recipe194373 import mreplace
>>> print mreplace('ectave steta racipas rock!', ('a',...
my_list.index(element) returns the index of the element using common comparision (as in == or __eq__() or __cmp__()). If you need to find an element on the list using identity comparing (is) then this function can do it for you
A simple calculation of small increments to be applied to a variable, given the variable time that has passed since last update, to make a linear increase over time (in units per second).
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.