#!/usr/local/bin/python2
class M(type):
  def __new__(cls, name, bases, attrs):
    print cls.__name__
    return type.__new__(cls, name, bases, attrs)

  def __init__(self, name, bases, attrs):
    self.i = 1
    attrs['a'] = 5
    self.d()

  def d(self):
    print self.__name__

class C(list):
  __metaclass__ = M
  a = 6

print C.i