def newclass(name, *bases, **attribs):
    class _NewType(type):
        def __new__(cls):
            return type.__new__(cls, str(name), bases, attribs)
        def __init__(self, *args, **kwargs):
            pass # XXX quick fix for python 2.6, not sure if this is correct. seems to work.
    return _NewType()
Make sure we flock and unflock when flock=True
dataset/ETHPy150Open kdart/pycopia/aid/pycopia/aid.py/newclass--crossover with--dataset/ETHPy150Open Yelp/paasta/tests/test_utils.py/TestFileLogWriter.test_maybe_flock