简体   繁体   中英

Sublime Text x Python - @property

I'm new to sublime text and would like to disable the auto-fill when I enter @pro... for @property and choose the suggestion.
It fills in a function using the private variable syntax, which I rarely use in this way.

I tried looking under snippets but found nothing. Any suggestions?

fyi
@property is a Decorator used to create dynamic attributes of python classes.

I was using it as follows

import os

class Plugin:
    @property
    def signature(self):
        if os.name == 'nt':
            pass
        return 64

But what I want to avoid is

class DataBase:
    @property
    def foo(self):
        return self._foo

If you are using Python package and its completing these snippets use PackageResourceViewer plugin and modify your snippets of that package. If you are not using any plugin check your sublime text snipppets and modify them as what you want:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM