Re: [Python-ideas] Adding "View Python 3 Documentation" to all Python 2 documentation URLs

2017-09-06 Thread Bar Harel
A bit radical but do you believe we can contact Google to alter the search
results?
It's for the benefit of the user after all, and many just switch to python
3 in the version picker anyway.

On Thu, Sep 7, 2017, 4:18 AM Guido van Rossum  wrote:

> That's a good idea. Could you suggest it to
> https://github.com/python/pythondotorg/ ? (There is actually a version
> switcher on every page, but it's rather polite. :-)
>
> On Wed, Sep 6, 2017 at 3:52 PM, Ryan Gonzalez  wrote:
>
>> Right now, many Google searches for Python modules return the Python 2
>> documentation. IMO since 2 will be reaching EOL in around 3 years, it
>> would be nice to have a giant red box at the top with a link to the
>> Python 3 documentation.
>>
>> SFML already does something like this:
>> https://www.sfml-dev.org/tutorials/2.3/
>>
>> (I mean, it would be even nicer to have a "jump to latest version" for
>> *all* not-new Python versions, though I figured just 2 would be a lot
>> easier.)
>>
>> --
>> Ryan (ライアン)
>> Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
>> http://refi64.com/
>> ___
>> Python-ideas mailing list
>> Python-ideas@python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>
>
>
> --
> --Guido van Rossum (python.org/~guido)
> ___
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Adding "View Python 3 Documentation" to all Python 2 documentation URLs

2017-09-06 Thread Guido van Rossum
That's a good idea. Could you suggest it to
https://github.com/python/pythondotorg/ ? (There is actually a version
switcher on every page, but it's rather polite. :-)

On Wed, Sep 6, 2017 at 3:52 PM, Ryan Gonzalez  wrote:

> Right now, many Google searches for Python modules return the Python 2
> documentation. IMO since 2 will be reaching EOL in around 3 years, it
> would be nice to have a giant red box at the top with a link to the
> Python 3 documentation.
>
> SFML already does something like this: https://www.sfml-dev.org/
> tutorials/2.3/
>
> (I mean, it would be even nicer to have a "jump to latest version" for
> *all* not-new Python versions, though I figured just 2 would be a lot
> easier.)
>
> --
> Ryan (ライアン)
> Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
> http://refi64.com/
> ___
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
--Guido van Rossum (python.org/~guido)
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Adding "View Python 3 Documentation" to all Python 2 documentation URLs

2017-09-06 Thread Victor Stinner
Another example is PyPI showing a bold "Latest version: x.x.x".
Example: https://pypi.python.org/pypi/requests/2.17.0

Victor

2017-09-07 0:52 GMT+02:00 Ryan Gonzalez :
> Right now, many Google searches for Python modules return the Python 2
> documentation. IMO since 2 will be reaching EOL in around 3 years, it
> would be nice to have a giant red box at the top with a link to the
> Python 3 documentation.
>
> SFML already does something like this: https://www.sfml-dev.org/tutorials/2.3/
>
> (I mean, it would be even nicer to have a "jump to latest version" for
> *all* not-new Python versions, though I figured just 2 would be a lot
> easier.)
>
> --
> Ryan (ライアン)
> Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
> http://refi64.com/
> ___
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] PEP draft: context variables

2017-09-06 Thread francismb
Hi!,

> Core concept
> 
>
> A context-local variable is represented by a single instance of
> ``contextvars.Var``, say ``cvar``. Any code that has access to the
``cvar``
> object can ask for its value with respect to the current context. In the
> high-level API, this value is given by the ``cvar.value`` property::
>
> cvar = contextvars.Var(default="the default value",
>description="example context variable")
>
> assert cvar.value == "the default value"  # default still applies
>
> # In code examples, all ``assert`` statements should
> # succeed according to the proposed semantics.

[...]

> Running code in a clean state
> '
>
> Although it is possible to revert all applied context changes
> using the above primitives, a more convenient way to run a block
> of code in a clean context is provided::
>
> with context_vars.clean_context():
> # here, all context vars start off with their default values
> # here, the state is back to what it was before the with block.

why not to call the section 'Running code in the default state' and the
method just `.default_context()`:

with context_vars.default_context():
# here, all context vars start off with their default values
# here, the state is back to what it was before the with block.

Means `clean` here `default` (the variable is constructed as
cvar = ontextvars.Var(default="the default value", ...) ?

Thanks in advance,
--francis

___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/