modernize icon indicating copy to clipboard operation
modernize copied to clipboard

use `from six.moves import ...`

Open pavlix opened this issue 9 years ago • 1 comments

The resulting code for simple library imports makes code unnecessarily verbose. For example when you import ConfigParser in legacy code or configparser in Python 3.x code, you generally don't want to access the class via six.moves.configparser.ConfigParser. See example below.

Legacy code:

import ConfigParser

parser = ConfigParser.ConfigParser()

Python 3.x code:

import configparser

parser = configparser.ConfigParser()

Modernized code:

import six.moves.configparser

parser = six.moves.configparser.ConfigParser()

pavlix avatar Oct 03 '16 10:10 pavlix

+1. I find this to be an annoying "feature".

At the end of the day, what I'd really like is for a minimal amount of changed lines in the code, compared to a maximal amount of changed lines. Especially because (someday), the six support will need to be ripped out/augmented for new compatibility -- maybe in the next project major version jump from 3 to 4, aka "twelve" 😄 ?

ngie-eign avatar Aug 23 '19 02:08 ngie-eign