On Sun, 13 Jul 2014 04:06:24 -0700 (PDT) "Edward K. Ream" <[email protected]> wrote:
> P.S. The PersistenceDataController class uses an unusual coding > style. The abbreviation for this class is pd. Rather than using > "self" as the first argument of each member, the first argument of > all pd members is, you guessed it, "pd". This saves the usual > assignment: pd = self in each member. > > A single comment at the start of the class disables all pylint > warnings about "self" not being the first argument of a member: # > pylint: disable=no-self-argument > > I rather like this new coding style. YMMV, but don't bother trying > to talk me out of it :-) Ok, I won't :-), but I have to say it: Eww. :-] I've never really felt the need for c = self type assignments, in fact I think they make code harder to read, since you have to keep track of whether c is self or an argument or a local var. A good programming environment should make it easy to keep track of which class contains the method you're editing ;-) Kind of makes me wonder if clones are the problem, seeing you do lose that context when you collect a group of methods together in a view, whereas bookmarks... I think bookmarks need an alternative view in the MVC sense which uses QTreeView - this would basically create two trees in the Leo UI, but I think it might make them more intuitive than the current more compact view. Of course sometimes it would be nice if self wasn't such a long word, e.g. _ or something. I guess that's an advantage of C++, if you use a proportional font, 'this' will take up less space :-) Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
