Python glob and raw string
Neil Cerutti
neilc at norwich.edu
Thu Jan 16 13:45:49 EST 2014
On 2014-01-16, Chris Angelico <rosuav at gmail.com> wrote:
>> Hmmm... I might be doing too much in __init__. ;)
>
> Hmm, why is it even a class? :) I guess you elided all the
> stuff that makes it impractical to just use a non-class
> function.
I didn't remove anything that makes it obviously class-worthy,
just timestamp checking, and several dicts and sets to store
data.
The original version of that code is just a set of three
functions, but the return result of that version was a single
dict. Once the return value got complicated enough to require
building up a class instance, it became a convenient place to
hang the functions.
--
Neil Cerutti
More information about the Python-list
mailing list