Skip to content

usage of basestring in add_unique_check leads to a NameError Exception in py3 #11

@ramanduh

Description

@ramanduh
 def add_unique_check(self, key,
                        code=UNIQUE_CHECK_FAILED,
                        message=MESSAGES[UNIQUE_CHECK_FAILED]):
        """
            Add a unique check on a single column or combination of columns.
    
            Arguments
            ---------
    
            `key` - a single field name (string) specifying a field in which all
            values are expected to be unique, or a sequence of field names (tuple
            or list of strings) specifying a compound key
    
            `code` - problem code to report if a record is not valid, defaults to
            `UNIQUE_CHECK_FAILED`
    
            `message` - problem message to report if a record is not valid
    
            """
    
>       if isinstance(key, basestring):
E       NameError: name 'basestring' is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions