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

use obj.id_ instead of obj.id #285

Closed
wants to merge 2 commits into from
Closed

use obj.id_ instead of obj.id #285

wants to merge 2 commits into from

Conversation

benjaminxscott
Copy link
Contributor

As reported by @NikkiEllis during integration testing in chantilly

edit: This change breaks round-tripping - will defer on merging until CI is cleared

@gtback
Copy link
Contributor

gtback commented Dec 18, 2015

I don't think this should get merged as is. There's too much existing code it would break.

I'll take full blame for using id_ rather than id. I was originally trying to prevent conflicts with all Python built-ins, not just reserved words (class, for, from, etc.). More discussion in #234.

If there's a way to make id and id_ both reference the same variable, that would be fine:

@property
def id(self):
    return self.id_

@id.setter
def id(self, value):
    self.id_ = value

(WARNING: I just typed that code in without testing it at all, so no guarantees it works 😉)

@gtback gtback assigned clenk and unassigned bworrell Jul 15, 2016
@gtback
Copy link
Contributor

gtback commented Jul 19, 2016

I misunderstood this PR. We shouldn't be messing with the binding objects (switching id to id_) unless there are bugs in the bindings. It's possible that for consistency we should allow using id at the API layer in addition to id_ (which is what my earlier comment was describing), but at this point I don't think that's a high priority.

@gtback gtback closed this Jul 19, 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.

4 participants