Coder Social home page Coder Social logo

python-consistency's Introduction

python-consistency

I love Python. But there's one thing that bothers me: inconsistent naming in many modules in its standard Library.

Some names are surprising, inconsistent across modules, or simply incorrect. This is mostly caused by the fact tha several modules were developed before the introduction of PEP-8, and now we're stuck with these names in older modules.

It has been said and discussed in the past that the stdlib is in fact inconsistent, but fixing this has almost always been disregarded as being too painful (after all, we don't want a new Python 3 all over again). However, this way, we will never move away from these inconsistencies. Perhaps this is fine, but I believe that with some effort, we can fix this for generations to come.

This module was written based on a discussion on python-ideas I started in July 2016 as an attempt to get this fixed for once and for all. Although the core developers don't see a need to fix this at this point in time, as it requires a lot of effort that is simply not worth the benefits, I still feel it should be part of Python's future.

While maintaining full backwards compatibility, this module adds consistently named aliases to modules in the standard library (as suggested in the linked thread). This module currently is nothing more than a bunch of renames that you can import. For instance:

from consistency import logging

logging.get_logger(__name__)

Ultimately, I feel that Python itself should provide these properly named alternatives. The original variant should be aliased with them (or the other way around), without defining a deprecation timeline for the original names. This should make it possible to eventually make the stdlib consistent, Pythonic and unsurprising.

Project Status

This project is currently in its early development stages.

Python Support

This project will only support Python 3.6 or later. Its aim will never be to support a wide range of versions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.