Hello all, I'm a long time R user, but recently also using Python. I noticed that RStudio rolled out Python through reticulate. It's great so far!
My question is, how do you debug in Python? In R, I simply step through the code script in my console with cmd+enter. But you can't do that with Python, some of them are objects. Here's my example. class person: def __init__(self, id, created_at, name, attend_date, distance): """Create a new `person`. """ self._id = id self.created_at = created_at self.name = name self.attend_date = attend_date self.distance = distance @classmethod def get_person(self, employee): """Find and return a person by. """ return person(employee['created_at'], employee['id'], employee['name'], employee['attend_date'], employee['distance'] ) The error message says self._id was 'str', but expecting an 'int'. I can't do: > self._id = 5 I guess it's "hidden". Can't really assign and test like that. It seems hardcore Python programmers just use a debugger, and do not understand the greatness of interactive IDE and console. I'd still like to stay in IDE, hopefully. So, how are the R users coping with object classes? Do you just instantiate every time? What if you got 10 of these class person objects to debug? I know this may be a Python question. But, I really wanted to see from a R user's working experience. Thanks a lot, Mike [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.