Skip to content

Conversation

b5y
Copy link
Contributor

@b5y b5y commented Aug 11, 2016

Add rename method with tests. Remove task from TODO list. Update CHANGELOG.


def rename(self, new_value):
if self.type in ('def', 'class'):
setattr(self, 'name', new_value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can directly do self.name = new_value here, same for line 1028.

Copy link
Contributor Author

@b5y b5y Aug 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In first time I thought about this solution, but this attribute is outside of init method.
So, I think it is not correct way. Please fix me if I am wrong.

@b5y b5y changed the title Add rename method. Add rename method from TODO list Aug 20, 2016
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

Successfully merging this pull request may close these issues.

2 participants