Python is a first-class citizen in SourceLair and one of our own beloved languages.
After Python 3.6 got released, we gave it a try in a few projects and we were stunned by all the new goodness that it brings.
For that reason, today we are excited to announce the general availability of Python 3.6 projects on SourceLair, along with a new, documented Python support policy and roadmap.
🆕 Python 3.6 features
secrets
module
The new secrets
module that ships with Python 3.6's standard library enables generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.
Formatted string literals
Python 3.6 ships with formatted string literals (or just f-strings), which is a new super convenient way for formatting strings in Python. This is how formatted string literals look like in Python:
>>> name = 'Alan'
>>> f'He said his name is {name}.'
'He said his name is Alan.'
What a ✨gorgeous✨ piece of code, right?
Variable type annotations
Variable type annotations allows developers to indicate the type of a particular variable. This wonderful new feature helps developer write self-documenting code and avoid mistakes via static analysis tools. All of these, while enjoying the amazing dynamic nature of Python.
Sneak peak of the variable type annotations syntax:
primes: List[int] = []
captain: str # Note: no initial value!
class Starship:
stats: Dict[str, int] = {}
These are just our favorite picks of the new goodness introduced in Python 3.6; the full list is available at the Python website.
Python support policy and roadmap
Along with this fresh Python release, it's a good time to update and document our Python support policy and roadmap.
Our goal with this new policy is to always provide you with the latest stable Python version to develop your application, while making sure we go along with the Python market towards moving over completely to Python 3, which is the currently actively developed Python version.
In brief:
- Starting today: Python 3.6 replaces Python 3.5 when creating a new project
- Over the next few days: Existing Python 3.5 projects will be transitioned to Python 3.6 gradually
- 📅 Monday 4 September 2017: Python 3 becomes the default Python version on SourceLair
- ⚠️ Monday 6 January 2018: SourceLair drops option for Python 2 for new projects
Take a look at our all new Python on SourceLair help article to read all the details about Python support on SourceLair.
We are super happy with Python 3.6 so far. We have already started transitioning our own projects to Python 3.6 and we hope the same will be true for you as well.
All you have to do is sign into your SourceLair account and create a new Python 3.6 project to get started!