The semantic meaning stays the same, regardless of the order of the values in the function call. Such values can be passed in any position and the function will return you a random choice. Say, you have a function in your library that selects a value randomly from different values passed as arguments. This is closely analogous to the keyword-only arguments syntax, but instead of setting the arguments after the asterisk`*`, you do it before the slash`/`. To use this feature, just set the arguments in your function definition and write a forward slash`/` after the last positional-only argument you want to declare. As of now, Python only had the option to define arguments as positional, keyword, or keyword-only, but with this new version we now have another way to define them by using positional-only parameters. One way to achieve such explicitness is by how the function can be called with its arguments. The more explicit these definitions are, the easier they are to implement. Positional-only parametersįunction definitions are a key element when designing libraries and APIs for user consumption.
From there you will just need to switch to Python 3.8 as your interpreter in P圜harm (if you’re not sure how to switch the interpreter, jump into our documentation for help). To try them out, get the latest version of P圜harm and download the current beta release of Python 3.8 from here. This article will walk you through the features currently supported by our latest P圜harm release.
Of course, P圜harm couldn’t get behind, so we now support some of the major features coming with this new version. From new ways of assigning expressions to restriction of usage of function declarations, calls, and variable assignations, this latest release presents new options to code.
The language is evolving according to its community’s needs by addressing cases where new syntax or logic become necessary. The release of Python 3.8 brought new features to the Python coding realm.