In [1]:
class C(object):
    root = []
    def __init__(self, arg):
        self.arg = arg

In [3]:
c = C('arg1')

In [4]:
c


Out[4]:
<__main__.C at 0x10f4a48d0>

In [7]:
c.arg


Out[7]:
'arg1'

In [8]:
c.blank = True

In [11]:
c_class = c.__class__

In [14]:
c_class.root


Out[14]:
[]

In [15]:
c.root.append(98)

In [16]:
C.root


Out[16]:
[98]

In [18]:
c


Out[18]:
<__main__.C at 0x10f4a48d0>

In [19]:
c.__dict__


Out[19]:
{'arg': 'arg1', 'blank': True}

In [20]:
C.__dict__


Out[20]:
<dictproxy {'__dict__': <attribute '__dict__' of 'C' objects>,
 '__doc__': None,
 '__init__': <function __main__.__init__>,
 '__module__': '__main__',
 '__weakref__': <attribute '__weakref__' of 'C' objects>,
 'root': [98]}>

In [27]:
sample_instr = ' HYPERLINK "http://dx.doi.org/10.1283/s710092-123-9154-2" \\t "_blank" '

In [28]:
import re

In [36]:
re.match(r' HYPERLINK "(.+)" \t ".+"', sample_instr)

In [37]:
a = [5, 6, 7]

In [42]:
iter(iter(a)).next()


Out[42]:
5

In [ ]: