is it more common or less common to create a method without an
argument?  For me it's more common without an argument which is why I
thought to leave it off in the original snippet.  Then you can tab in
to add an arg if you wish.  I'm curious what others think.

And also, why do we need a separate snippet for class methods? (i.e.
those that take self.)  Because of indentation we can detect that the
method is in a class, except for the edge case of closures.  But is
this edge case enough to warrant a whole new snippet?  For me it makes
more sense to use def for all and in the case of closures I just tab
out to get rid of the self arg.  Thoughts?

kumar

On 10/26/06, Alexander John Ross <[EMAIL PROTECTED]> wrote:
* Revised the New Class snippet.
* Revised the New Function snippet to not insert 'self' as the first arg.
* Added New Method snippet which inserts self as first arg. TabTrigger: `defs`.
* Added snippets for variations on try/except/else/finally.  All are tab 
triggered by `try`.
* Added a snippet for the tidy property idiom from 
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/205183.  Invoke with 
`property`.
* Got rid of the getter/setter snippets.  Python programmers really should be 
using `property` for that kind of thing.
* Added a snippet to insert `(...):` after function and class names.

Changed:
A   trunk/Bundles/Python.tmbundle/Snippets/Inside Class Def: Insert 
(__):.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/Inside Function: Insert 
(__):.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/Inside String: Insert "…".tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/Inside String: Insert '…'.tmSnippet
D   trunk/Bundles/Python.tmbundle/Snippets/New Class (class).plist
A   trunk/Bundles/Python.tmbundle/Snippets/New Class.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/New Function.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/New Method.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/New Property.tmSnippet
D   trunk/Bundles/Python.tmbundle/Snippets/Try:Except (try).plist
A   trunk/Bundles/Python.tmbundle/Snippets/Try:Except.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/Try:Except:Else.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/Try:Except:Else:Finally.tmSnippet
A   trunk/Bundles/Python.tmbundle/Snippets/Try:Except:Finally.tmSnippet
D   trunk/Bundles/Python.tmbundle/Snippets/def.plist
D   trunk/Bundles/Python.tmbundle/Snippets/getter.plist
D   trunk/Bundles/Python.tmbundle/Snippets/if __name__ == '__main__' 
(ifmain).plist
A   trunk/Bundles/Python.tmbundle/Snippets/if __name__ == '__main__'.tmSnippet
D   trunk/Bundles/Python.tmbundle/Snippets/quote-pair in strings single.plist
D   trunk/Bundles/Python.tmbundle/Snippets/quote-pair in strings.plist
D   trunk/Bundles/Python.tmbundle/Snippets/self (.).plist
A   trunk/Bundles/Python.tmbundle/Snippets/self.tmSnippet
D   trunk/Bundles/Python.tmbundle/Snippets/setter.plist

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev


_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev

Reply via email to