Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove python 2.6 support #234

Merged
merged 1 commit into from
Nov 1, 2016
Merged

remove python 2.6 support #234

merged 1 commit into from
Nov 1, 2016

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented Oct 31, 2016

No description provided.

@@ -118,7 +118,7 @@ def setup_logging(name):
if 'NVIM_PYTHON_LOG_FILE' in os.environ:
prefix = os.environ['NVIM_PYTHON_LOG_FILE'].strip()
major_version = sys.version_info[0]
logfile = '{0}_py{1}_{2}'.format(prefix, major_version, name)
logfile = '{}_py{}_{}'.format(prefix, major_version, name)
handler = logging.FileHandler(logfile, 'w')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the positional specifiers not considered a good practice / idiomatic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it. There is no specifiers on the other side, so what are the numbers references to? All 2.7+ code bases I have seen do not use them. (OTOH what could be useful in some cases are string specifiers into a dict)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no specifiers on the other side, so what are the numbers references to?

The position of the arguments, i.e. '{0}_{1}_{0}'.format('foo', 'bar') will give foo_bar_foo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean I didn't understand what it it means, just that it makes no sense . If the reader is able to count the arguments on the right side, then the reader should be capable to do that on the left side as well. If a case is so complicated that cues are needed, then those should be on both sides, using named arguments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not pressing for it, just was curious. Python has too many ways to do things.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will get worse, python 3.6 will have a dedicated f"format" string literal kind where you directly can access locals :)

Copy link
Member

@fwalch fwalch Oct 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it can be useful in certain situations.. but yeah:

Python has too many ways to do things.

But anyway, 👍 for this change, reads better without the numbers IMO.

@bfredl bfredl merged commit cef445f into neovim:master Nov 1, 2016
@justinmk
Copy link
Member

justinmk commented Nov 2, 2016

We might need to add a check for python 2.7 in CheckHealth, if there isn't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants