Home > other >  Python doubt
Python doubt

Time:11-22


Python3.7 version,
Def munge (sep: AnyStr=None) :
Def munge () - & gt; AnyStr:

This two sentences define who used to represent what meaning? General introduction to the book did not say, but look at other people's code, often can use,

CodePudding user response:

Help you searched:

The mentioned
Travis CI
- "looks and: continuous integration with
And then to open the
Nomadictype/pymunge: A Python interface to MUNGE
:
reference
A Python interface to MUNGE.

Pymunge is a Python wrapper for the C API of MUNGE, called libmunge. Pymunge provides functions provides the and classes to create and validate credentials with MUNGE, and the use and interact with MUNGE contexts.

- "it is clear that is a third-party library MUNGE python API=interface,
- "the conclusion is that:
CI=continuous integration is a function of senior
Add MUNGE at least I have never heard before
- "are not so common and relatively advanced function and usage
- "so, of course," introduction to ordinary did not say "in the book

In addition
Help you find the corresponding API documentation
Welcome to pymunge 's documentation! - pymunge 0.1.3 documentation
It is good to yourself to find what you want
Because you said
 def munge (sep: AnyStr=None) : 
Def munge () - & gt; AnyStr:

Website in the document mentioned,

Then just noticed that you itself function syntax
Def munge (sep: AnyStr=None)
Unlike standard python code and definition,
- "I don't know where do you see, you didn't give the source,

Then you also to a sentence
"But look at the code of others, often can use"

So I don't know what you said is what,



CodePudding user response:

Upstairs said wandering the example of this is PEP8, this is for function parameters and return values of annotations, such as
 def add (x: int, y: int) - & gt; List: 
Return (x, y)
the above function said to expect for the int type parameters, return values for the list, but it is not mandatory, you pass in a string is not an error, is a kind of specification, you can quickly understand function parameters and return values of the type, if the incoming parameters or return values in pycharm types and statement annotations yellow but not an error code

CodePudding user response:

Def munge (sep: AnyStr=None) :
Def munge () - & gt; AnyStr:

Sep parameter type for AnyStr, the default value is None
AnyStr function return type
  • Related