Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__str__ in descriptions should go into the base class #13

Closed
oweidner opened this issue Feb 3, 2012 · 0 comments
Closed

__str__ in descriptions should go into the base class #13

oweidner opened this issue Feb 3, 2012 · 0 comments

Comments

@oweidner
Copy link
Contributor

oweidner commented Feb 3, 2012

... wich is "AttributeInterface"

def __str__(self):
    '''String representation of the resource description'''
    result = str("{")
    for attribute in self.list_attributes():
        if self.attribute_is_vector(attribute):
            value = repr(self.get_vector_attribute(attribute))
        else:
            value = str(self.get_attribute(attribute))
        result += str("'%s' : '%s'," % (str(attribute), value))
    result += "}"
    return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant