-
Notifications
You must be signed in to change notification settings - Fork 118
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
Conversation
@@ -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') |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
We might need to add a check for python 2.7 in CheckHealth, if there isn't already. |
No description provided.