Markov process representation

Max M maxm at mxm.dk
Thu Mar 16 03:17:30 EST 2006


Jack Diederich wrote:
> On Wed, Mar 15, 2006 at 04:50:31PM -0800, Paul Rubin wrote:
> 
>>"kpp9c" <kp8 at mac.com> writes:
>>
>>>    self._all_states |= set(key[i] for key in probabilities)
>>>I am running:
>>>Python 2.3 (#1, Sep 13 2003, 00:49:11)
>>
>>generator comprehensions are new in 2.4.  Try:
>>
>>   self._all_states |= set([key[i] for key in probabilities])
> 
> 
> And sets aren't a builtin in 2.3
> 
> try:
>   set()
> except NameError:
>   import sets
>   set = sets.Set

nitpick:

try:
     set
except NameError:
     from sets import Set as set

-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96



More information about the Python-list mailing list