[python] Pulnocni rozjimani :-)

Vladimir Macek macek na sandbox.cz
Neděle Květen 10 01:05:56 CEST 2015


Just having fun.

    $ python
    >>> a = {}
    >>> b = {'a': a}
    >>> a['b'] = b
    >>> a
    {'b': {'a': {...}}}
    >>> b
    {'a': {'b': {...}}}
    >>> import cPickle
    >>> ap = cPickle.dumps(a)
    >>> del a, b
    >>> len(ap)
    26
    >>> a = cPickle.loads(ap)
    >>> a
    {'b': {'a': {...}}}
    >>> a['b']
    {'a': {'b': {...}}}
    >>> a['b']['a']
    {'b': {'a': {...}}}
    >>> a['b']['a']['b']
    {'a': {'b': {...}}}
    >>>

Navaze nekdo? :-)

V.



Další informace o konferenci Python