def __init__(self, uri = None, timestamp = None, length = None, 
                 md5 = None, sha1 = None, sha256 = None, mime_type = None,
                 change = None, path = None, lastmod = None, 
                 capability = None,
                 ts_at = None, md_at = None,
                 ts_completed = None, md_completed = None,
                 ts_from = None, md_from = None,
                 ts_until = None, md_until = None,
                 resource = None, ln = None):
        # Initialize core attributes
        self.uri = None
        self.timestamp = None
        self.length = None
        self.mime_type = None
        self.md5 = None
        self.sha1 = None
        self.sha256 = None
        self.change = None
        self.path = None
        self._extra = None
        self.ln = None
        # Create from a Resource-like object? Copy any relevant attributes
        if (resource is not None):
            for att in ['uri','timestamp','length','md5','sha1','sha256',
                        'change','path', 'capability',
                        'ts_at','md_at', 'ts_completed', 'md_completed',
                        'ts_from','md_from','ts_until','md_until','ln']:
                if hasattr(resource,att):
                    setattr(self, att, getattr(resource, att))
        # Any arguments will then override
        if (uri is not None):
            self.uri = uri
        if (timestamp is not None):
            self.timestamp = timestamp
        if (length is not None):
            self.length = length
        if (md5 is not None):
            self.md5 = md5
        if (sha1 is not None):
            self.sha1 = sha1
        if (sha256 is not None):
            self.sha256 = sha256
        if (mime_type is not None):
            self.mime_type = mime_type
        if (change is not None):
            self.change = change
        if (path is not None):
            self.path = path
        if (ts_at is not None):
            self.ts_at = ts_at
        if (ts_completed is not None):
            self.ts_completed = ts_completed
        if (ts_from is not None):
            self.ts_from = ts_from
        if (ts_until is not None):
            self.ts_until = ts_until
        if (capability is not None):
            self.capability = capability
        if (ln is not None):
            self.ln = ln
        # Timestamp setters
        if (lastmod is not None):
            self.lastmod=lastmod
        if (md_at is not None):
            self.md_at=md_at
        if (md_completed is not None):
            self.md_completed=md_completed
        if (md_from is not None):
            self.md_from=md_from
        if (md_until is not None):
            self.md_until=md_until
        # Sanity check
        if (self.uri is None):
            raise ValueError("Cannot create resource without a URI")
Checking bidimensional shapes
dataset/ETHPy150Open resync/resync/resync/resource.py/Resource.__init__--crossover with--dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_tablesMD.py/ShapeTestCase.test03