© Copyright 2000-2015 Source Code Online. Free Source Code and Scripts Downloads.
|Code Listing by Stephan Diehl|
This lets treat you a python sets.Set as a scalar (number,string,...)
The german linux magazine featured an article about the PERL module
This sounded like fun and I implemented it in Python (probably not everything).
Perl code lines: over 700
Python code lines: 100
I came up with this when I tried to implement some autocompletion feature.
The problem is to find a common substring (beginning from the start) for all strings in a given list.
I couldn't find an existing recipe that is doing this...
This recipe is a rewrite of a portion of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/157768 .
It shows an easy way to write read-only attributes with the help of meta classes.
A metaclass is used to wrap all (or just some) methods for logging purposes. The underlying mechanism can be used as well to check pre/post conditions, attribute access,...
The basic point is, that the actual class must not be changed in any...
Mutating list methods such as 'append' or 'extend' return None instead of the (mutated) list itself. Sometimes, this is not the desired behaviour.
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.