[TxMt] Re: [Python Bundle] Suggestions "stolen" from Ruby Bundle and bugs from the latest SVN

Jacob Rus jrus at hcs.harvard.edu
Sat Dec 16 06:12:48 UTC 2006


Ryan Wilcox wrote:
>>>     It would be cool if the class snippet inserted super(...) into the
>>>     constructor for the class. (Is this possible with clever
>>>     mirroring?)
> 
> In Action:
> 
> class SuperSnippetInAction(object):
>     """docstring for SuperSnippetInAction"""
>     def __init__(self, arg):
>         super(SuperSnippetInAction, self).__init__()
>         self.arg = arg
> 
> The 5th tab selects the whole "super..." line, for easy "fixing". (I suppose tab 5 could be places in between the ()s of the __init__ call, for easy parameter adding too

I think you should make this a separate command.  Personally, I'd rather 
ditch the auto docstrings that were recently added as well, as they are 
not formatted like the docstrings I write, and often when I use the 
snippet I want to scribble something super fast without a docstring 
anyway.  Adding too much to these snippets actually makes them less 
useful, because they just end up cluttered with unnecessary stuff that 
needs to be deleted half the time.  But you are onto something with 
this.  Typing out the whole super… line can be a pain, so doing it 
automatically would be nice, just not as part of the default class snippet.

-Jacob




More information about the textmate mailing list