Hi Bruno! Thank you so much for your help. I really appreciate the pro assistance. :)
On Thu, Jun 16, 2011 at 1:42 PM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > <ot> > This could be written much more simply as "return self.modified > > self.created" > </ot> Omg, thanks! That's way better. :D >> def get_separator(self): >> return ' :: ' > In this case (returning a constant), it would be much simpler to make > it a class (or instance) attribute. Ah, I think I get it. Just to clarify things for me, does attribute equal a property or method? :D I am guessing that attribute = property, so you're saying that I could/should do this: @property def separator(self): return ' :: ' > Properties are for computed attributes - that is, things that are the > semantically (conceptually, whatever) attributes, but requires any > computation, either on get, set or del. Ah, interesting... I think I need to let this all sink in a little. :) > But well, if you prefer java- > like getters/setters, then choice is yours... Depends on the > programmer's background, I have a little experience with Actionscipt 3 and PHP5 OOP... I guess I am used to the concept/practice of getters/setters, (public/private/other) class methods and properties. Are you saying that a non-property model class method is equivalent to getter/setter? Or, maybe you are saying that the "lat = property(_get_lat)" python property syntax is like getters/setters/accessors in other programming langs? Again, sorry if stupid questions... sorry if this is getting OT for the Django list. > and of course of whether the code was written > before new-style classes and the descriptor protocol.... I have not heard of this before. Googling "new-style classes and the descriptor protocol" now. ;) Looks like I have a lot of learning to do! :D Thanks again, I greatly appreciate your time and assistance. Have a great day. Cheers, Micky -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.