#75 pypi.org officially launches

Python Bytes - Podcast tekijän mukaan Michael Kennedy and Brian Okken - Maanantaisin

Kategoriat:

Sponsored by Datadog: pythonbytes.fm/datadog

Brian #1: numba

Michael #2: pip 10 is out!

  • Time for: python -m pip install --upgrade pip
  • Features:
    • Python 2.6 is no longer supported - if you need pip on Python 2.6, you should stay on pip 9, which is the last version to support Python 2.6.
    • Support for PEP 518, which allows projects to specify what packages they require in order to build from source. (PEP 518 support is currently limited, with full support coming in future versions - see the documentation for details).
    • Significant improvements in Unicode handling for non-ASCII locales on Windows.
    • A new "pip config" command.
    • The default upgrade strategy has become "only-if-needed"
    • Many bug fixes and minor improvements.

Brian #3: Keyword (Named) Arguments in Python: How to Use Them

  • Using keyword arguments is often seen when there are many arguments to a function that have useful defaults, and you only want to override the default with some of the arguments.
  • Example:
    >>> print('comma', 'separated', 'words', sep=', ')
    comma, separated, words
  • You can take positional arguments and require some to be named with various uses of *
    def foo(*, bar, baz):
      print(f'{bar} {baz}') 
  • Lots of other useful tricks in this article.

Michael #4: pypi.org officially launches

Brian #5: Python Modules and Packages – An Introduction

  • In Python, it is, and understanding modules and packages is key to getting a good footing when learning Python. It’s also an area that trips up people when they start trying to create reusable code.
  • How to create a Python module
  • Locations where the Python interpreter searches for a module
  • How to obtain access to the objects defined in a module with the import statement
  • How to create a module that is executable as a standalone script
  • How to organize modules into packages and subpackages
  • How to control package initialization

Michael #6: Pandas only like modern Python

  • From December 31st, 2018, Pandas will drop support for Python 2.7. This includes no backports of security or bug fixes (unless someone volunteers to do those)
  • The final release before December 31, 2018 will be the last release to support Python 2. The released package will continue to be available on PyPI and through conda.
  • Starting January 1, 2019, all releases will be Python 3 only.
  • The full reddit discussion is interesting.

Our news

Visit the podcast's native language site