コード例 #1
0
ファイル: string.py プロジェクト: yashlamba/PySyft
    def __init__(self, value: Any = None, id: Optional[UID] = None):
        if value is None:
            value = ""

        UserString.__init__(self, value)

        self._id: UID = id if id else UID()
コード例 #2
0
 def __init__(self,
              docstring=DEFAULTS['docstring'],
              options=DEFAULTS['options'],
              default=DEFAULTS['default'],
              optional=DEFAULTS['optional'],
              values=DEFAULTS['values'],
              category=DEFAULTS['category'],
              callback=DEFAULTS['callback'],
              synopsis=DEFAULTS['synopsis'],
              environ=DEFAULTS['environ'],
              registry=DEFAULTS['registry'],
              mandatory=None,
              name=DEFAULTS['name'],
              source=DEFAULTS['source']):
     UserString.__init__(self, '')
     GenericOption.initialize(self, locals())
     self.data = self.data or ''
コード例 #3
0
ファイル: apiclient.py プロジェクト: cynthia/bikeshed
    def __init__(self, mimeType):
        UserString.__init__(self, mimeType)
        self._type = None
        self._subtype = None
        self._structure = None

        slashIndex = mimeType.find('/')
        if (-1 < slashIndex):
            self._type = mimeType[:slashIndex]
            mimeType = mimeType[slashIndex + 1:]
            plusIndex = mimeType.find('+')
            if (-1 < plusIndex):
                self._subtype = mimeType[:plusIndex]
                self._structure = mimeType[plusIndex + 1:]
            else:
                self._structure = mimeType
        else:
            self._type = mimeType
コード例 #4
0
ファイル: pyhp.py プロジェクト: Featherweight-IP/fwnoc-gen
 def __init__(self):
     UserString.__init__(self, '')
コード例 #5
0
ファイル: kword.py プロジェクト: russolsen/sallyforth
 def __init__(self, value):
     value = value[1::]
     UserString.__init__(self, value)
コード例 #6
0
 def __init__(self, value):
     UserString.__init__(self, value)
コード例 #7
0
 def __init__(self, code_str):
     UserString.__init__(self, re.sub(r"(\s|[-_])", "", code_str).upper())
コード例 #8
0
 def __init__(self, path: str, external: bool = True, protocol: str = ""):
     self.path = path
     self.external = external
     # Strip :// if the user mistakenly included it in the argument
     self.protocol = protocol.rstrip("://")
     UserString.__init__(self, path)
コード例 #9
0
ファイル: formatter.py プロジェクト: stevenmz/python-pgp
 def __init__(self, *args, **kwargs):
     self.forced_encoding = kwargs.pop('force_encoding', None)
     UserString.__init__(self, *args, **kwargs)