Re: Python 2.2 or 3.5

2015-10-11 Thread Rustom Mody
On Sunday, October 11, 2015 at 12:04:18 PM UTC+5:30, Chris Angelico wrote:
> On Sun, Oct 11, 2015 at 5:15 PM, Chris Angelico  wrote:
> > On Sun, Oct 11, 2015 at 4:11 PM, Rustom Mody  wrote:
> >> At 
> >> https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance
> >>
> >> it says
> >> In Python 2.2, you can inherit from built-in classes such as int, list, 
> >> dict, etc.
> >>
> >> So is it 3.5 or 2.2?
> >
> > More accurate would be "Since Python 2.2, you can etc etc". Every 3.x
> > version permits this, as do all 2.x back as far as 2.2. Seems to
> > warrant a docs patch.
> >
> > http://bugs.python.org/issue25375

Thanks -- More useful than the other responses
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24784] Build fails with --with-pydebug and --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ab4f23ab983 by Victor Stinner in branch 'default':
Close #24784: Fix compilation without thread support
https://hg.python.org/cpython/rev/3ab4f23ab983

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6259] ctypes pointer arithmetic

2015-10-11 Thread Chris Angelico

Chris Angelico added the comment:

Fair enough. Still needs someone to update the patch though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25373] test.regrtest: -jN (with N != 1) + --slow + child error or interruption = TypeError

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

Python 2.7 is not affected by the bug (I'm unable to reproduce it on Python 
2.7).

Python 3.4 is near end-of-life and this bug looks like a corner case, I don't 
think that it's worth to fix it.

I fixed the bug in Python 3.5 and 3.6. I added an unit test for Python 3.6 
(test_regrtest). Thanks for the report Arfrever.

--
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 463a09a3bfff by Victor Stinner in branch 'default':
Issue #25357: Add an optional newline paramer to binascii.b2a_base64().
https://hg.python.org/cpython/rev/463a09a3bfff

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6259] ctypes pointer arithmetic

2015-10-11 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for triaging work, but an outdated patch is not an enough reason to 
close an issue. Also, the default value of "status" field is "open" at 
http://bugs.python.org/issue?@template=search=1 so closing an unresolved 
issue will make it harder to find for potential interested contributors. See 
https://docs.python.org/devguide/triaging.html for more information.

--
nosy: +berker.peksag
stage:  -> needs patch
versions: +Python 3.6 -Python 2.7, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25373] test.regrtest: -jN (with N != 1) + --slow + child error or interruption = TypeError

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 746b98342943 by Victor Stinner in branch 'default':
Close #25373: Fix regrtest --slow with interrupted test
https://hg.python.org/cpython/rev/746b98342943

New changeset ef70e5373131 by Victor Stinner in branch '3.5':
lose #25373: Fix regrtest --slow with interrupted test
https://hg.python.org/cpython/rev/ef70e5373131

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 493845d905c5 by Victor Stinner in branch '3.5':
Close #25367: Fix test_coroutines()
https://hg.python.org/cpython/rev/493845d905c5

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24575] timemodule build fail - missing definitions for _Py_BEGIN_SUPPRESS_IPH and _Py_END_SUPPRESS_IPH

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

setup.py gets C flags from Makefile using the sysconfig module. You must have 
-DBUILD_CORE in Makefile. When I compiled Python using "./configure; make" the 
time module is build.

How do you compile Python?

"#define _Py_BEGIN_SUPPRESS_IPH" is already declared in pyport.h which is 
included by Python.h, and timemodule.c includes Python.h.

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25375] Don't mention 2.2 in the 3.x docs

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a81b47fb5848 by Benjamin Peterson in branch '2.7':
don't mention Python 2.2 (closes #25375)
https://hg.python.org/cpython/rev/a81b47fb5848

New changeset 275d388ca1fc by Benjamin Peterson in branch '3.4':
don't mention Python 2.2 (closes #25375)
https://hg.python.org/cpython/rev/275d388ca1fc

New changeset 0017245ff5ce by Benjamin Peterson in branch 'default':
merge 3.5 (#25375)
https://hg.python.org/cpython/rev/0017245ff5ce

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python 2.2 or 3.5

2015-10-11 Thread Chris Angelico
On Sun, Oct 11, 2015 at 5:15 PM, Chris Angelico  wrote:
> On Sun, Oct 11, 2015 at 4:11 PM, Rustom Mody  wrote:
>> At 
>> https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance
>>
>> it says
>> In Python 2.2, you can inherit from built-in classes such as int, list, 
>> dict, etc.
>>
>> So is it 3.5 or 2.2?
>
> More accurate would be "Since Python 2.2, you can etc etc". Every 3.x
> version permits this, as do all 2.x back as far as 2.2. Seems to
> warrant a docs patch.
>
> http://bugs.python.org/issue25375

... which has just been applied. I'm not sure how long it'll be before
you see the change on the web site, but it won't be long. Thanks for
the report!

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How do I extend a class that I never instantiate myself?

2015-10-11 Thread Chris Angelico
On Sun, Oct 11, 2015 at 4:53 PM, dieter  wrote:
> Otherwise, you can likely use a technique called "monkey patching".
> This is dynamically changing code at startup time.
> In your case, it could look like:
>
>from ... import Node
>
>def new_method(self, ...):
>   ...
>
>Node.new_method = new_method
>
> From that moment on, the "Node" class has a new method "new_method".

And if you're going to do this for a good number of methods, I'd
recommend something like this:

def monkeypatch(cls):
def deco(func):
setattr(cls, func.__name__, func)
return func
return deco

@monkeypatch(Node)
def new_method(self, ...):
...

@monkeypatch(Node)
def another_new_method(self, ...):
...

@monkeypatch(Node)
def yet_another(self, ...):
...

@monkeypatch(Node)
def and_another(self, ...):
...

If you REALLY want to look like Ruby, you could actually do something
rather sneaky. When a decorator is called, the name has yet to be
bound; conceptually, it's like defining the function/class and then
using "x = deco(x)" at the end, but you can actually access the
previous use of that name. So check this out:

# -- cut --
class Foo:
def old_method(self):
print("Old method.")

print("Before we begin patching, Foo is %x." % id(Foo))

def monkeypatch(cls):
# NOTE: Needs to be able to find its own globals, so you
# can't use this inside a function or import it from another
# module. Play with sys._getframe if you want to.
old = globals()[cls.__name__]
print("Inside monkeypatch, old is %x, and cls is %x." % (id(old), id(cls)))
for attr in dir(cls):
# Don't override dunders. TODO: Figure out if they were
# set here, and if so, *do* override.
if attr.startswith("__") and attr.endswith("__"): continue
setattr(old, attr, getattr(cls, attr))
return old

@monkeypatch
class Foo:
def new_method(self):
print("New method!")

print("After patching, Foo is %x." % id(Foo))

f = Foo()
f.old_method()
f.new_method()
# -- cut --

However, don't blame me if other programmers chase you down with
torches and pitchforks.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python 2.2 or 3.5

2015-10-11 Thread Mark Lawrence

On 11/10/2015 06:57, Rustom Mody wrote:

On Sunday, October 11, 2015 at 11:09:17 AM UTC+5:30, Mark Lawrence wrote:

On 11/10/2015 06:11, Rustom Mody wrote:

At 
https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance

it says
In Python 2.2, you can inherit from built-in classes such as int, list, dict, 
etc.

So is it 3.5 or 2.2?

For some reason google takes me to the 3.3 docs
Replacing the 3.3 by 3.5 seems to keep the same entry



If just use "3" instead of "3.3" or "3.5" you'll always get the latest
stable version of the docs.  You can select any version you like from
the drop down list up in the top left hand corner of the display.


Leave aside the decimal point I did not even specify 2 or 3

Just gave "embedding python alternative to swig" to google and I get that 3.3
page



Specify other searches and you'll often get Python 2.x references 
instead of Python 3.  What about it?


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


[issue25368] test_eintr fails with --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42101b8f777c by Victor Stinner in branch 'default':
Close #25368: Fix test_eintr when Python is compiled without thread support
https://hg.python.org/cpython/rev/42101b8f777c

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-11 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8737b841fcf by Victor Stinner in branch '3.5':
Close #25367: Fix test_coroutines with no thread support
https://hg.python.org/cpython/rev/d8737b841fcf

New changeset d8002372e5df by Victor Stinner in branch 'default':
Merge 3.5 (test_coroutines, issue #25367)
https://hg.python.org/cpython/rev/d8002372e5df

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24784] Build fails with --with-pydebug and --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 20ef719b1cb9 by Victor Stinner in branch '3.5':
Close #24784: Fix compilation without thread support
https://hg.python.org/cpython/rev/20ef719b1cb9

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

I fixed the issue based on Guido's patch and Serhiy's suggestion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Understanding WSGI together with Apache

2015-10-11 Thread Peter Otten
Johannes Bauer wrote:

> I'm seeing some weird crosstalk between them which I do not understand.
> In particular, crosstalk concerning the locales of the two. One
> application needs to output, e.g., date information using a German
> locale. It uses locale.setlocale to set its LC_ALL to de_DE.UTF-8.
> 
> Now the second application doesn't need nor want to be German. It wants
> to see the C locale everywhere, in particular because at some point it
> uses datetime.datetime.strptime() to parse a datetime.

There is a library that might interest you. Babel allows multiple locales in 
the same process. See

http://babel.pocoo.org/


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

Thanks for reviews Serhiy & Martin.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25368] test_eintr fails with --without-threads

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

It's now fixed, thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24784] Build fails with --with-pydebug and --without-threads

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

It's now fixed, thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25369] test_regrtest fails with --without-threads

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

It's now fixed, thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6259] ctypes pointer arithmetic

2015-10-11 Thread Chris Angelico

Chris Angelico added the comment:

Nudging this as a forgotten patch. Is anyone at all interested in this, or 
should it be closed as not worth the hassle? The patch is ancient and doesn't 
apply to 3.6.

Propose closing, to clean up the tracker. It can always be reopened if the 
patch is updated to current.

--
nosy: +Rosuav

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

Buildbots failed.

http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/2807/steps/test/logs/stdio

==
FAIL: test_reduce (test.test_descr.PicklingTests)
--
Traceback (most recent call last):
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_descr.py", line 
4745, in test_reduce
obj.__reduce_ex__(proto)
AssertionError: ValueError not raised

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25369] test_regrtest fails with --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0d0d83b1c078 by Victor Stinner in branch 'default':
Close #25369: Fix test_regrtest without thread support
https://hg.python.org/cpython/rev/0d0d83b1c078

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

==
ERROR: test_asyncio_1 (test.test_coroutines.CoroAsyncIOCompatTest)
--
Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_coroutines.py", line 1351, in test_asyncio_1
loop = asyncio.new_event_loop()
NameError: name 'asyncio' is not defined

--

--
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25373] test.regrtest: -jN (with N != 1) + --slow + child error or interruption = TypeError

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

Oh! I didn't see that you proposed a fix, sorry. I fixed the bug differently. 
IMHO it's easier to not add the test to test_times.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

> NameError: name 'asyncio' is not defined

Oops :-( I also fixed this one, sorry.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python 2.2 or 3.5

2015-10-11 Thread Chris Angelico
On Sun, Oct 11, 2015 at 4:11 PM, Rustom Mody  wrote:
> At 
> https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance
>
> it says
> In Python 2.2, you can inherit from built-in classes such as int, list, dict, 
> etc.
>
> So is it 3.5 or 2.2?

More accurate would be "Since Python 2.2, you can etc etc". Every 3.x
version permits this, as do all 2.x back as far as 2.2. Seems to
warrant a docs patch.

http://bugs.python.org/issue25375

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25375] Don't mention 2.2 in the 3.x docs

2015-10-11 Thread Chris Angelico

New submission from Chris Angelico:

See: https://mail.python.org/pipermail/python-list/2015-October/697818.html

Saying "In Python 2.2" is not helpful in the 3.x docs. Even in the 2.x docs, 
it's pretty safe to assume by now that everyone's on 2.2+. (At very least, 
"Since" would be better than "If".) Patch attached.

I suspect that a lot of that FAQ is outdated now, though.

--
assignee: docs@python
components: Documentation
files: no_mention_2.2.patch
keywords: patch
messages: 252769
nosy: Rosuav, docs@python
priority: normal
severity: normal
status: open
title: Don't mention 2.2 in the 3.x docs
Added file: http://bugs.python.org/file40750/no_mention_2.2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python 2.2 or 3.5

2015-10-11 Thread Rustom Mody
On Sunday, October 11, 2015 at 11:09:17 AM UTC+5:30, Mark Lawrence wrote:
> On 11/10/2015 06:11, Rustom Mody wrote:
> > At 
> > https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance
> >
> > it says
> > In Python 2.2, you can inherit from built-in classes such as int, list, 
> > dict, etc.
> >
> > So is it 3.5 or 2.2?
> >
> > For some reason google takes me to the 3.3 docs
> > Replacing the 3.3 by 3.5 seems to keep the same entry
> >
> 
> If just use "3" instead of "3.3" or "3.5" you'll always get the latest 
> stable version of the docs.  You can select any version you like from 
> the drop down list up in the top left hand corner of the display.

Leave aside the decimal point I did not even specify 2 or 3

Just gave "embedding python alternative to swig" to google and I get that 3.3 
page
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue22228] Adapt bash readline operate-and-get-next function

2015-10-11 Thread Chris Angelico

Chris Angelico added the comment:

Any other interest in this? It'd be nice to get this in trunk and start being 
able to recommend it to people.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python 2.2 or 3.5

2015-10-11 Thread Ben Finney
Rustom Mody  writes:

> On Sunday, October 11, 2015 at 11:09:17 AM UTC+5:30, Mark Lawrence wrote:
> > On 11/10/2015 06:11, Rustom Mody wrote:
> > > At https://docs.python.org/3.5/faq/[…]
> > >
> > > it says
> > > In Python 2.2, you can inherit from built-in classes such as int, list, 
> > > dict, etc.
> > >
> > > So is it 3.5 or 2.2?
[…]
>
> Leave aside the decimal point I did not even specify 2 or 3
>
> Just gave "embedding python alternative to swig" to google and I get
> that 3.3 page

Fascinating, I'm sure. How is this relevant to your question about the
*content of the Python docs*?

If you want to complain about Google's search results, you know where to
find Google.

If you want to discuss the content of the Python docs, citing “what
Google showed me” is irrelevant.

-- 
 \“The idea that He would take his attention away from the |
  `\   universe in order to give me a bicycle with three speeds is |
_o__)  just so unlikely that I can't go along with it.” —Quentin Crisp |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24931] _asdict breaks when inheriting from a namedtuple

2015-10-11 Thread Larry Hastings

Larry Hastings added the comment:

Why is this marked as a release blocker?  It doesn't strike me as all that 
major.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-10-11 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

> New changeset 136ad559fa4f by Brett Cannon in branch '2.7':
> Issue #25188: Add -P/--pgo to test.regrtest for PGO building.
> https://hg.python.org/cpython/rev/136ad559fa4f
> 
> +# required to permit running tests with PGO flag on/off
> +if pgo:
> +args_tuple[1]['pgo']=pgo

This looks ugly.
The following change should work and would be consistent with handling of 
huntrleaks and use_resources:

--- Lib/test/regrtest.py
+++ Lib/test/regrtest.py
@@ -508,7 +508,8 @@
 for test in tests:
 args_tuple = (
 (test, verbose, quiet),
-dict(huntrleaks=huntrleaks, use_resources=use_resources)
+dict(huntrleaks=huntrleaks, use_resources=use_resources,
+ pgo=pgo)
 )
 yield (test, args_tuple)
 pending = tests_and_args()
@@ -526,9 +527,6 @@
 except StopIteration:
 output.put((None, None, None, None))
 return
-# required to permit running tests with PGO flag on/off
-if pgo:
-args_tuple[1]['pgo']=pgo
 # -E is needed by some tests, e.g. test_import
 popen = Popen(base_cmd + ['--slaveargs', 
json.dumps(args_tuple)],
stdout=PIPE, stderr=PIPE,

--
nosy: +Arfrever
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25361] Is python-3-5-0.exe compiled with SSE2 instrutions? If so should we mention this?

2015-10-11 Thread Steve Dower

Steve Dower added the comment:

Since we officially support platforms that don't require SSE, I'll disable 
those instructions for 3.5.1.

As eryksun points out, this doesn't affect 64-bit builds, which are the 
standard for most performance critical uses anyway.

--
assignee: docs@python -> steve.dower
components: +Build, Distutils -Documentation, Installation
keywords: +3.5regression
nosy: +dstufft, eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df33dbbef7bb by Serhiy Storchaka in branch 'default':
Issue #24164: Fixed test_descr: __getnewargs_ex__ now is supported in protocols 
2 and 3.
https://hg.python.org/cpython/rev/df33dbbef7bb

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20289] Make cgi.FieldStorage a context manager

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 80501740ab84 by Serhiy Storchaka in branch '3.5':
No longer skip tests for classes with __getnewargs_ex__.  The copy module
https://hg.python.org/cpython/rev/80501740ab84

New changeset 6f4dd9bc1f20 by Serhiy Storchaka in branch 'default':
No longer skip tests for classes with __getnewargs_ex__.  The copy module
https://hg.python.org/cpython/rev/6f4dd9bc1f20

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25372] load_module() does not link submodule to parent package

2015-10-11 Thread R. David Murray

R. David Murray added the comment:

Brett: Martin is calling pkgutil.find_loader, which is not marked as 
deprecated, and then calling load_module on the returned loader, which 
apparently does *almost* what he wants but not quite.

Martin: maybe you should explain your use case in more detail.  Probably there 
is a better way to accomplish it using importlib directly.  Unless one of your 
issues is needing to write 2/3 compatible code...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Victor. Tests are fixed.

I think the documentation needs to be updated. Here is a patch for pickle 
documentation.

--
stage: resolved -> patch review
Added file: http://bugs.python.org/file40751/pickle_new_ex_protocol_2_doc.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25376] KeyboardInterrupt handling and traceback broken on Windows 10

2015-10-11 Thread Miikka Salminen

New submission from Miikka Salminen:

Pressing Ctrl+C to raise a KeyboardInterrupt while waiting for user input in an 
input() call yields an incomplete traceback.

The behaviour appears in a Python REPL session started by issuing "python" 
without quotes in a Windows cmd session:

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> input("Question: ")
Question: Traceback (most recent call last):
  File "", line 1, in 
>>>

When executing input_test.py (a single line Python source code file containing 
just an input("Question: ") call) from the cmd prompt by issuing "python 
input_test.py" without quotes, every other time the traceback is incomplete and 
every other time the Ctrl+C keypress yields, erroneously, an EOFError instead 
of a KeyboardInterrupt:

C:\x>python input_test.py
Question: Traceback (most recent call last):
  File "input_test.py", line 1, in 
input("Question: ")
EOFError
^C
C:\x>python input_test.py
Question: Traceback (most recent call last):
  File "input_test.py", line 1, in 

C:\x>

--
components: Interpreter Core, Windows
messages: 252800
nosy: mdf, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: KeyboardInterrupt handling and traceback broken on Windows 10
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-10-11 Thread Matthias Klose

Matthias Klose added the comment:

now marked as regression, and lowered the priority.

but how should regressions on release branches be marked else?

--
keywords: +3.4regression, 3.5regression -patch
priority: release blocker -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25376] KeyboardInterrupt handling and traceback broken on Windows 10

2015-10-11 Thread Miikka Salminen

Miikka Salminen added the comment:

Did some more testing. KeyboardInterrupt traceback displays properly when 
pressing Ctrl+C during an infinite loop:

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> while True:
... pass
...
Traceback (most recent call last):
  File "", line 2, in 
KeyboardInterrupt
>>>

Also when running a file in a similar way as I did in the original bug report:

C:\x>python infinite_loop.py
Traceback (most recent call last):
  File "infinite_loop.py", line 2, in 
pass
KeyboardInterrupt

C:\x>

Could this mean that the problem is more related to reading stdin than the 
actual KeyboardInterrupt?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25374] Deficiencies in type hint usage in Python standard libraries

2015-10-11 Thread R. David Murray

R. David Murray added the comment:

You need to install the (currently externally maintained) type hints files from 
https://github.com/python/typeshed.  I don't think a decision has been made 
about if/when these files will be incorporated into the distribution.

--
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25376] KeyboardInterrupt handling and traceback broken on Windows 10

2015-10-11 Thread Miikka Salminen

Miikka Salminen added the comment:

Just tried the same in an IDLE session, but it seems to display the 
KeyboardInterrupt correctly:

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> input("Question: ")
Question: 
Traceback (most recent call last):
  File "", line 1, in 
input("Question: ")
  File "C:\y\Python\Python35\lib\idlelib\PyShell.py", line 1385, in readline
line = self._line_buffer or self.shell.readline()
KeyboardInterrupt
>>> 

Running the file input_test.py I meantioned in my original report doesn't seem 
to diplay anything when Ctrl+C is pressed:

= RESTART: C:\x\input_test.py =
Question: 
>>>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25372] load_module() does not link submodule to parent package

2015-10-11 Thread Brett Cannon

Brett Cannon added the comment:

This is entirely on purpose as you're not meant to call load_module() if you 
want to import code programmatically; that's what importlib.import_module() is 
for. The load_module() method -- which is kind of deprecated thanks to 
exec_module() -- is there purely to initialize the module being imported, with 
everything else the responsibility of other parts of import. You should only be 
calling load_module/execx_module tonload a specific set of bytes and to bypass 
the import machinery entirely, in which case you have to manage any "extras" 
you want, like setting a submodule on a parent package.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2015-10-11 Thread Davin Potts

Changes by Davin Potts :


--
nosy: +davin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Problem with Python 3.5.0

2015-10-11 Thread eetix letix
Hi,

I'm sorry but the last version of Python (3.5.0) had a problem. I start and
I meet this problem :

>>>a=5
>>>if a>0:
. . . print("a is a positive.")
. . . if a<0:
 ^
SyntaxError: invalid syntax
>>>

Normally this should work but problem
 comes to the
fact that Python considers "a" is a positive number and refuses to do the
command >>>if a<0:

And the command \n is doesn't working :

>>> a="test\nto\nsee\nif\nit\nis\nworking"
>>> a
'test\nto\nsee\nif\nit\nis\nworking'
>>>


Normally, \n should make
 that the text
returns to the line but doesn't make it. And if y do :

>>> a="""test
. . .  to
. . .  see
. . .  if
. . .  it
. . .  is
. . .  working"""
>>>a
'test\nto\nsee\nif\nit\nis\nworking'
>>>


Thanks to fix this problems and good luck ;)


PS : I'm sorry for this really bad english but I'm french and I'm 14

-- 
https://mail.python.org/mailman/listinfo/python-list


Problem encountered using v3.5

2015-10-11 Thread Ben S
Working on a Windows 7 64 bit machine, I installed 64 bit python v3.5.  Was
able to pip install a number of basic packages like numpy, pyamml, and nltk
(off the Christoph Gohlke page).

Did not test numpy or the other packages too much, but did explore nltk and
encountered major flaw: Much of the functionality is available (eg.
tokenize functions work fine), and I am able to import corpora; however
when I try to examine the contents of the corpora using for eg.
"brown.words()" I got an AttributeError.  I posted the issue at SO and see
there that a few other people are having similar problems.  A link to my SO
post is below, or just google "Stack Overflow Python AttributeError when
calling nltk Brown corpus."

http://stackoverflow.com/questions/33041621/python-attributeerror-when-calling-nltk-brown-corpus

I am going to install the 32 bit python v3.5 to see if that works.

Thanks,
Ben
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem encountered using v3.5

2015-10-11 Thread Laura Creighton
In a message of Sat, 10 Oct 2015 16:16:14 -0700, Ben S writes:

>http://stackoverflow.com/questions/33041621/python-attributeerror-when-calling-nltk-brown-corpus
>
>I am going to install the 32 bit python v3.5 to see if that works.
>
>Thanks,
>Ben

This looks like this nltk bug.
https://github.com/nltk/nltk/issues/1106

Talk to them about what you should do, and then tell everybody on
Stack Overflow, please.

Laura
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem with Python 3.5.0

2015-10-11 Thread Matt Wheeler
On 11 October 2015 at 18:12, eetix letix  wrote:
> Hi,
>
> I'm sorry but the last version of Python (3.5.0) had a problem. I start and
> I meet this problem :
>
a=5
if a>0:
> . . . print("a is a positive.")
> . . . if a<0:
>  ^
> SyntaxError: invalid syntax

>
> Normally this should work but problem comes to the fact that Python
> considers "a" is a positive number and refuses to do the command >>>if a<0:

You're almost there, but your guess as to the reason for the error
isn't quite right.

It seems that the syntax in the Python shell is subtly different to
code in a module.
Because the second 'if' is a distinct statement from the first, the
python shell seems to require a second return.

However consider that perhaps using an 'else' or 'elif' instead of a
completely separate 'if'
And also consider that most people regard 0 to be positive, so you
probably meant (a>=0).

That means you can simplify to
if a>=0:
print("a is a positive")
else:
print("no need to evaluate a a second time")


> And the command \n is doesn't working :
>
 a="test\nto\nsee\nif\nit\nis\nworking"
 a
> 'test\nto\nsee\nif\nit\nis\nworking'

>
>
> Normally, \n should make that the text returns to the line but doesn't make
> it. And if y do :
>
 a="""test
> . . .  to
> . . .  see
> . . .  if
> . . .  it
> . . .  is
> . . .  working"""
a
> 'test\nto\nsee\nif\nit\nis\nworking'


\n is an escape sequence rather than a command
Have a look at what happens if you try print(a)


> Thanks to fix this problems and good luck ;)
>
>
> PS : I'm sorry for this really bad english but I'm french and I'm 14

Don't worry, it's certainly better than my French!



-- 
Matt Wheeler
http://funkyh.at
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25194] Opt-in motivations & affiliations page for core contributors

2015-10-11 Thread R. David Murray

R. David Murray added the comment:

Since this is new, rather than just updating the devguide I'm posting my 
proposed entry here first in case there is feedback.

One think I noticed in writing this is that the page is called "motivations", 
but because the instructions are to write the entry in the third person, it 
does not seem natural to actually talk about *why* I am motivated to 
contribute.  This may or may not be a bug :)

--
Added file: http://bugs.python.org/file40752/rdm_motivations.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25361] Is python-3-5-0.exe compiled with SSE2 instrutions? If so should we mention this?

2015-10-11 Thread Laura Creighton

Laura Creighton added the comment:

Another 2 bits of data:

I now know of 2 separate users from a Swedish teenager mailing list, whose 
machines (in each case 'my father's old laptop') didn't have SSE2.  One youth 
was running XP but spent today successfully migrating to windows 7 with help 
from her father.  The other was already running windows 7.

Neither of them had ever used Python before.  They are now running 
3.4.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



installation Python

2015-10-11 Thread Zrinko Budimir
Hi,

What is the difference between Python 3.5.0 and 3.5.0rc4?
What is rc4?

-- 
Zrinko Budimir
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: installation Python

2015-10-11 Thread Joel Goldstick
On Sun, Oct 11, 2015 at 10:13 AM, Zrinko Budimir 
wrote:

> Hi,
>
> What is the difference between Python 3.5.0 and 3.5.0rc4?
> What is rc4?
>
> --
> Zrinko Budimir
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
> rc = release candidate.  If the final version is available, use that


-- 
Joel Goldstick
http://joelgoldstick.com/stats/birthdays
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem with Python 3.5.0

2015-10-11 Thread Joel Goldstick
On Sun, Oct 11, 2015 at 1:12 PM, eetix letix  wrote:

> Hi,
>
> I'm sorry but the last version of Python (3.5.0) had a problem. I start
> and I meet this problem :
>
> >>>a=5
> >>>if a>0:
> . . . print("a is a positive.")
> . . . if a<0:
>  ^
> SyntaxError: invalid syntax
> >>>
> Not sure what is going on above
>


> Normally this should work but problem
>  comes to the
> fact that Python considers "a" is a positive number and refuses to do the
> command >>>if a<0:
>
> And the command \n is doesn't working :
>
> >>> a="test\nto\nsee\nif\nit\nis\nworking"
> >>> a
> 'test\nto\nsee\nif\nit\nis\nworking'
> >>>
>
> In the interactive python shell, typing a name will give the
> representation of the variable.  So you will see the \n.  If you type
> print(a), you will get what you expected
>


> Normally, \n should make
>  that the text
> returns to the line but doesn't make it. And if y do :
>
> >>> a="""test
> . . .  to
> . . .  see
> . . .  if
> . . .  it
> . . .  is
> . . .  working"""
> >>>a
> 'test\nto\nsee\nif\nit\nis\nworking'
> >>>
>
>
> Thanks to fix this problems and good luck ;)
>
>
> PS : I'm sorry for this really bad english but I'm french and I'm 14
> 
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>


-- 
Joel Goldstick
http://joelgoldstick.com/stats/birthdays
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem with Python 3.5.0

2015-10-11 Thread Vincent Vande Vyvre

Le 11/10/2015 19:12, eetix letix a écrit :

Hi,

I'm sorry but the last version of Python (3.5.0) had a problem. I 
start and I meet this problem :


>>>a=5
>>>if a>0:
. . . print("a is a positive.")
. . . if a<0:
 ^
SyntaxError: invalid syntax
>>>

Normally this should work but problem comes to the fact that Python 
considers "a" is a positive number and refuses to do the command >>>if 
a<0:


And the command |\n is doesn't working :

|
|>>> a="test||\nto||\nsee||\nif||\nit||\nis||\nworking"
|
|>>> a
|
|'||test||\nto||\nsee||\nif||\nit||\nis||\nworking'
>>>


|
Normally, \n should make that the text returns to the line but doesn't 
make it. And if y do :


>>> a="""test
. . .  to
. . .  see
. . .  if
. . .  it
. . .  is
. . .  working"""
>>>a
|'||test||\nto||\nsee||\nif||\nit||\nis||\nworking'
>>>


|
|Thanks to fix this problems and good luck ;)


|
|PS : I'm sorry for this really bad english but I'm french and I'm 14
|



Hi,

see:

>>> a = 5
>>> if a > 0:
... print('a is a positive')
...  # here, type a Enter
a is a positive
>>> elif a 

>>> a = "test\nto\nsee\nif\nit\nis\nworking"
>>> a
'test\nto\nsee\nif\nit\nis\nworking'
>>> print(a)
test
to
see
if
it
is
working
>>>

Clear ?

Vincent
--
https://mail.python.org/mailman/listinfo/python-list


Re: Strong typing implementation for Python

2015-10-11 Thread Matt Wheeler
On 9 October 2015 at 17:26, John Michael Lafayette
 wrote:
> I would like Python to have a strong typing feature that can co-exist with
> the current dynamic typing system. Currently Python is like this:
>
> var animal = Factory.make("dog")  # okay.
> var dog = Factory.make("dog")   # okay.
> var cat = Factory.make("dog")# are you sure?
>
> I would like Python to also be able to also do this:
>
> Animal a = Factory.make("dog")# okay. Dog is Animal.
> Dog d = Factory.make("dog") # okay. Dog is Dog.
> Cat c = Factory.make("cat")   # Runtime error. Dog is not Cat.

Though it's intended for performance optimisation rather than simply
static typing for static typing's sake, you could probably use Cython
to achieve what you want...

...but then you might start to see the benefits of dynamic typing :)


-- 
Matt Wheeler
http://funkyh.at
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Strong typing implementation for Python

2015-10-11 Thread gal kauffman
> You can run your code inside a class definition, abuse metaclassing to
replace the namespace with yourown dict and override the __setitem__
function. Then you can implement a var function so it inspect into it's
caller namespace, and inserts the given key into it.
This hack doesn't apply on any sub scope, is not scaleable, and is generaly
bad.

import inspect

# Implement how you see right
class VarError(NameError):
pass
class MissingVarError(VarError):
pass
class ExisitngVarError(VarError):
pass

def namespacemeta(namespace):
class _(type):
@classmethod
def __prepare__(metacls, name, bases):
return namespace()
return _

class staticnamespace(dict):
PRE_USER_SETTED_ITENS = 2

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.items_setted = 0

def var_setitem(self, key, typ):
# Use descriptor object for better control
# Implement type-checking yourself
return super().__setitem__(key, typ)

def __setitem__(self, key, value):
if self.items_setted >= staticnamespace.PRE_USER_SETTED_ITENS: # Ugly hack,
probably won't work IRL
if key not in self:
raise MissingVarError(key)

self.items_setted += 1
return super().__setitem__(key, value)

def var(key, typ):
calling_namespace = inspect.currentframe().f_back.f_locals
if key in calling_namespace:
raise ExisitngVarError(key)

calling_namespace.var_setitem(key, typ)

class _(object, metaclass=namespacemeta(staticnamespace)):
if __name__ == '__main__':
try:
a = 13
except MissingVarError:
print("Couldn't set 'a'")

var('a', int)
a = 37
print(a)

try:
var('a', str)
except ExisitngVarError:
print ("Can't call var twice with the same variable name")
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25373] test.regrtest: -jN (with N != 1) + --slow + child error or interruption = TypeError

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

No idea. I don't think that --slow is heavily used in the wild. The current
behaiour looks good to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25361] Is python-3-5-0.exe compiled with SSE2 instrutions? If so should we mention this?

2015-10-11 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25361] Is python-3-5-0.exe compiled with SSE2 instrutions? If so should we mention this?

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 15f6bbe944fa by Steve Dower in branch '3.5':
Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build
https://hg.python.org/cpython/rev/15f6bbe944fa

New changeset 3cf8c2930373 by Steve Dower in branch 'default':
Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build
https://hg.python.org/cpython/rev/3cf8c2930373

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: How do I extend a class that I never instantiate myself?

2015-10-11 Thread speeze . pearson
On Saturday, October 10, 2015 at 10:40:15 AM UTC-7, Ian wrote:
> name mangling

Awesome! I didn't know this was a feature.

> There's nothing wrong with [functional programming] IMO. In fact, Python
> does this in the standard library, e.g. len(objects) rather than
> objects.len().

...good point. I'll look at that option again with fresh eyes.

Thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25163] Windows installer in AllUsers mode presents wrong installation path

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 919b1dffa741 by Steve Dower in branch '3.5':
Issue #25163: Display correct directory in installer when using non-default 
settings.
https://hg.python.org/cpython/rev/919b1dffa741

New changeset 6f97c51b6dc5 by Steve Dower in branch 'default':
Issue #25163: Display correct directory in installer when using non-default 
settings.
https://hg.python.org/cpython/rev/6f97c51b6dc5

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25163] Windows installer in AllUsers mode presents wrong installation path

2015-10-11 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25378] Roundoff error on OS X

2015-10-11 Thread Michał Jan Warecki

New submission from Michał Jan Warecki:

This should speak for itself:

>>> 3*4.35
13.049
>>> 

The error is reproducible, and applies to all decimal numbers ending with 
\.[0-9]5, and \.[0-4] as well as \.[6-9], when multiplied by 3. Examples:

>>> 3*4.1
12.299
>>> 3*4.4
13.201
>>> 3*4.6
13.799
>>> 3*4.8
14.399
>>> 3*4.9
14.701
>>> 4*3.1
12.4
>>> 4*4.1
16.4
>>> 3*4.1
12.299
>>> 6*4.1
24.598
>>> 6*4.4
26.402
>>>

--
components: Macintosh
messages: 252828
nosy: Michał Jan Warecki, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Roundoff error on OS X
type: behavior
versions: Python 2.7, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18769] argparse remove subparser

2015-10-11 Thread paul j3

Changes by paul j3 :


--
nosy: +paul.j3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25378] Roundoff error on OS X

2015-10-11 Thread Michał Jan Warecki

Changes by Michał Jan Warecki :


--
components: +Interpreter Core

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: How do I extend a class that I never instantiate myself?

2015-10-11 Thread speeze . pearson
On Saturday, October 10, 2015 at 3:55:17 PM UTC-7, Steven D'Aprano wrote:
> # Solution 1: inject a new method into each and every instance in the tree.
> 
> node.foo = MethodType(foo, node)

Ooh, interesting. I'll meditate on that for a while.

> # Solution 2: hack the node type of each instance.
> 
> node.__class__ = MyNode

That is undoubtedly the coolest feature that I will absolutely never ever use.

> While both of the above have their uses, really the *right* way to do this
> is to stop being such an OOP purist. This isn't Java, we have functions for
> a reason.
> 
> Do you find len(alist) to be confusing and schizophrenic?

Um-- no, because I'm used to it. ;)
I'll definitely give the functional approach another think-over.

If I do go down the functional road, and I decide that I need to associate my
own data with each node (e.g. for callback functions), would there be a better
way to do that than just adding my own attribute onto each node?


> class MyNode(Node):
> @property
> def parent(self):
> parent = super(MyNode, self).parent
> if parent is not None:
> parent = MyNode(parent)
> return parent
> # etc.
> 
> Still a lot of work, and you really need to understand the original Node
> class very well. This is the problem with subclassing: it requires you to
> be intimately familiar with the *implementation details* of the class you
> subclass.

Hrm. Relying on implementation details of somebody else's library seems
dangerous... I think I'll shy away.

Thanks a lot!
-Spencer
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25378] Roundoff error on OS X

2015-10-11 Thread Ezio Melotti

Ezio Melotti added the comment:

See https://docs.python.org/3/tutorial/floatingpoint.html

--
nosy: +ezio.melotti
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Strong typing implementation for Python

2015-10-11 Thread Gregory Ewing

On 9 October 2015 at 17:26, John Michael Lafayette
 wrote:


I would like Python to also be able to also do this:

   Animal a = Factory.make("dog")# okay. Dog is Animal.
   Dog d = Factory.make("dog") # okay. Dog is Dog.
   Cat c = Factory.make("cat")   # Runtime error. Dog is not Cat.


You might like to investigate Boo, which is a .NET-based
language with a Python-like syntax:

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: How do I extend a class that I never instantiate myself?

2015-10-11 Thread speeze . pearson
On Saturday, October 10, 2015 at 11:32:24 PM UTC-7, Chris Angelico wrote:
> If you REALLY want to look like Ruby, 

Ha! This thread has provided so many interesting monkey-patching techniques,
but this might be the most perverse. Very cute.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25122] test_eintr randomly fails on FreeBSD

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

We should remove it, but test_eintr still hangs randomly on freebsd.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Static typing implementation for Python

2015-10-11 Thread Random832
Ben Finney  writes:
> The opposite of string typing is weak typing.

Well, I would say *string* typing [as used in, for example, sh and tcl]
is actually a form of weak typing. But anyway, the other issue is that
strong typing is meaningless. In general it seems like weak typing means
"the existence of implicit operations (either type conversions or any
other operation between objects of different types) that I don't like".

"Duck typing" of the sort that Python has, for example, could be and
sometimes is regarded as a form of weak typing.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Static typing implementation for Python

2015-10-11 Thread Chris Angelico
On Mon, Oct 12, 2015 at 8:33 AM, Random832  wrote:
> Ben Finney  writes:
>> The opposite of string typing is weak typing.
>
> Well, I would say *string* typing [as used in, for example, sh and tcl]
> is actually a form of weak typing. But anyway, the other issue is that
> strong typing is meaningless. In general it seems like weak typing means
> "the existence of implicit operations (either type conversions or any
> other operation between objects of different types) that I don't like".
>
> "Duck typing" of the sort that Python has, for example, could be and
> sometimes is regarded as a form of weak typing.

"Strong typing" is anything the current speaker likes. "Weak typing"
is anything the current speaker dislikes.

I'm fairly sure most arguments about "readable" or "unreadable" code
follow the same definitions.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Static typing implementation for Python

2015-10-11 Thread Ben Finney
Random832  writes:

> Ben Finney  writes:
> > The opposite of string typing is weak typing.
>
> Well, I would say *string* typing [as used in, for example, sh and tcl]
> is actually a form of weak typing.

I infer a smile as you write that, but to clarify for others: I made a
typo, and meant to contrast weak typing with strong typing.

-- 
 \“Like the creators of sitcoms or junk food or package tours, |
  `\ Java's designers were consciously designing a product for |
_o__)   people not as smart as them.” —Paul Graham |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-11 Thread Robert Collins

Robert Collins added the comment:

The fix is appropriate (we might want to think about symlinks in the future). 
I'd very much like a test for it (in Lib/unittest/test/test_discovery.py) and 
it should be applied to 3.5, master - older versions had this wrapped up in 
simpler code and won't fail like this.

--
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Strong typing implementation for Python

2015-10-11 Thread Vladimir Ignatov
Hi,

> You might like to investigate Boo, which is a .NET-based
> language with a Python-like syntax:

AFAIK Unity just dropped Boo support from version 5.0 because
virtually nobody used it. Those little known niche languages are
destined to extinct.

Interesting language is Apple's Swift. While it's statically typed
language, type specification is optional as far as compiler can figure
out type. That gives an interesting feeling because you don't need to
type types all over but in the same time you have all type checking we
normally expect from statically typed language. The syntax is not
pythonic but overall it looks like language got some influence from
Python.

Vladimir


http://itunes.apple.com/us/app/python-code-samples/id1025613117
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25143] 3.5 install fails poorly on Windows XP

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2316bc881eea by Steve Dower in branch '3.5':
Issue #25143: Improves installer error messages for unsupported platforms.
https://hg.python.org/cpython/rev/2316bc881eea

New changeset 2c384ba13fdd by Steve Dower in branch 'default':
Issue #25143: Improves installer error messages for unsupported platforms.
https://hg.python.org/cpython/rev/2c384ba13fdd

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25143] 3.5 install fails poorly on Windows XP

2015-10-11 Thread Steve Dower

Steve Dower added the comment:

Still need to validate the fix on WinXP, as I'm not 100% certain that enough UI 
will appear to show the user the error, but we will now bail right at the start 
and link to either help pages for installing updates (for Vista/7) or Python 
3.4 (for pre-Vista).

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18769] argparse remove subparser

2015-10-11 Thread paul j3

paul j3 added the comment:

Under what circumstances would this be useful?

http://bugs.python.org/issue19462 asks for a 'remove_argument' method.  That 
seems to be most useful if the argument is inherited from a parent parser.

A subparsers argument could be inherited from a parent (I think), but the 
parenting mechanism does not provide a reference to the corresponding  
_SubParsersAction object.  We'd have to look it up in the main parser._actions.

Also parenting does not make copies of the Actions.  It just copies references. 
 That means any change to the main parser  _SubParsersAction object is also a 
change to the parent's object.

http://bugs.python.org/issue22401 discusses the problems involved changing an 
inherited argument.

The method seems simple enough, but I'd like to see a better case for its value.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: How do I extend a class that I never instantiate myself?

2015-10-11 Thread Chris Angelico
On Mon, Oct 12, 2015 at 10:09 AM,   wrote:
> On Saturday, October 10, 2015 at 11:32:24 PM UTC-7, Chris Angelico wrote:
>> If you REALLY want to look like Ruby, 
>
> Ha! This thread has provided so many interesting monkey-patching techniques,
> but this might be the most perverse. Very cute.

Thank you for taking it in its proper light.

To be quite frank, I don't know that this is even supported. Can
anyone confirm or deny?

Simple test:

def deco(f): print(globals()[f.__name__])
foo = bar = "old"
@deco
def foo(x): pass
@deco
class bar(object): pass

If it prints 'old' twice, the trick works. I tested it on PyPy 2.4,
Jython 2.5, and CPython 2.7 and 3.6. More importantly, though, the
docs always describe decorators as being equivalent to defining a
function and then reassigning:

https://www.python.org/dev/peps/pep-0318/#motivation
https://docs.python.org/2/glossary.html#term-decorator
https://docs.python.org/2/reference/compound_stmts.html#function
https://docs.python.org/3/glossary.html#term-decorator
https://docs.python.org/3/reference/compound_stmts.html#function

So I think this is about on par with tinkering with sys._getframe to
make stuff work :)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Strong typing implementation for Python

2015-10-11 Thread Steven D'Aprano
On Mon, 12 Oct 2015 10:24 am, Vladimir Ignatov wrote:

> Hi,
> 
>> You might like to investigate Boo, which is a .NET-based
>> language with a Python-like syntax:
> 
> AFAIK Unity just dropped Boo support from version 5.0 because
> virtually nobody used it.

What's Unity? I've never heard of it. Why should Boo users care about it?


> Those little known niche languages are
> destined to extinct.

Yes, you are correct, and sadly while rubbish languages like PHP, Java,
Javascript and C continue in popularity for decades, amazingly good,
powerful, safe, rich languages like D, Eiffel and others languish in
obscurity as niche languages for just as long, and innovative languages
like Boo are almost certain to die off.

Network effects have a dark side, and the IT community as a whole is not
just conservative, but *stupidly* conservative to the point of pain. And
becoming *more* conservative and scared of change, not less.


> Interesting language is Apple's Swift. While it's statically typed
> language, type specification is optional as far as compiler can figure
> out type. 

That's called type inference, and there's nothing innovative about Swift to
include that as a feature. Type inference is *old*. The theory behind type
inference goes back to 1958, and languages such as ML and OCaml have
included it for decades, and yet here we are in 2015 and people think that
it's something cool and new :-(




-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list


Relaxed, or best-efforts JSON parser for Python?

2015-10-11 Thread Victor Hooi
Hi,

I'm attempting to parse MongoDB loglines.

The formatting of these loglines could best be described as JSON-like...

For example - arrays 

Anyhow, say I had the following logline snippet:

{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 
2 } }, Collection: { acquireCount: { w: 1 } }, oplog: { acquireCount: { w: 1 } 
} }

This won't parse with json.loads() - the main issues is the missing quotation 
marks (") around the strings.

My question, is there a more lenient, or relaxed JSON parser available for 
Python, that will try to do a best-efforts parsing of non-spec JSON?

Cheers,
Victor
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25125] "Edit with IDLE" does not work for shortcuts

2015-10-11 Thread Steve Dower

Steve Dower added the comment:

Because of the way Open With works, we can't do this unless we start building 
an EXE to launch IDLE (Windows automatically picks up most of the details from 
the target executable, so it will show as "pythonw" if we do it without the 
launcher).

Unassigning myself, as there doesn't seem to be anything to "do" right now. If 
consensus on moving all the versioned menus to the top level context menu is 
reached (possibly on the IDLE mailing list), it can be re-raised here. I 
personally don't consider a limitation of Windows 7 wrt shortcuts to be a 
compelling enough reason to change away from the submenu.

--
assignee: steve.dower -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18590] Found text not always highlighted by Replace dialog on Windows

2015-10-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#24972 fixes the immediate issue but the Find and Replace code are needlessly 
different in doing the same thing and redundant in double tagging found text, 
and there are some other glitches.  I think a better fix will be to only use 
the found tag, but this needs discussion, perhaps on idle-dev. #22179 also has 
some discussion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25379] Changes in traceback broke existing code (Python 3.5)

2015-10-11 Thread Bert JW Regeer

New submission from Bert JW Regeer:

One of the changes in Python 3.5's traceback functionality broke existing code 
compared to Python 3.4 by injecting an extra stack frame into the list when 
using traceback.extract_stack:

What this looks like on Python 3.5:

pyramid/tests/test_config/test_init.py 1108 includeme2 config.add_view(view2)
pyramid/util.py 526 wrapper return wrapped(self, *arg, **defaults)
pyramid/util.py 557 wrapper f = traceback.extract_stack(limit=4)
/Users/xistence/.pyenv/versions/3.5.0/lib/python3.5/traceback.py 201 
extract_stack stack = StackSummary.extract(walk_stack(f), limit=limit)

What it used to look like on Python 3.4:

pyramid/config/__init__.py 798 include c(configurator)
pyramid/tests/test_config/test_init.py 1108 includeme2 config.add_view(view2)
pyramid/util.py 526 wrapper return wrapped(self, *arg, **defaults)
pyramid/util.py 557 wrapper f = traceback.extract_stack(limit=4)

Notice that in the Python 3.5 version:

/Users/xistence/.pyenv/versions/3.5.0/lib/python3.5/traceback.py 201 
extract_stack stack = StackSummary.extract(walk_stack(f), limit=limit)

Is added.

We are tracking this issue here: https://github.com/Pylons/pyramid/issues/1973 
on our side.

--
messages: 252841
nosy: X-Istence
priority: normal
severity: normal
status: open
title: Changes in traceback broke existing code (Python 3.5)
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22179] Idle. Search dialog found text not highlited on Windows

2015-10-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am closing this because #24972 fixes the immediate issue.

--
dependencies:  -Found text not always highlighted by Replace dialog on Windows
resolution:  -> out of date
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22726] Idle: add help to config dialogs

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fd41b05b8227 by Terry Jan Reedy in branch '2.7':
Issue #22726: Re-activate config dialog help button with some content about
https://hg.python.org/cpython/rev/fd41b05b8227

New changeset 01f83efcc44b by Terry Jan Reedy in branch '3.4':
Issue #22726: Re-activate config dialog help button with some content about
https://hg.python.org/cpython/rev/01f83efcc44b

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25379] Changes in traceback broke existing code (Python 3.5)

2015-10-11 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report! Yes, this is a duplicate of issue 25108. It would be 
great if you have time to test it with the current 3.5 branch.

--
components: +Library (Lib)
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> traceback.extract_stack() compatibility break in 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25379] Changes in traceback broke existing code (Python 3.5)

2015-10-11 Thread Bert JW Regeer

Bert JW Regeer added the comment:

Looks like this is a dup of: https://bugs.python.org/issue25108

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Do you have a patch to move the untabbed pane, as is, to preferences?  If not, 
I will write one.

--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25254] Idle: debugger source line highlighting fails again

2015-10-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

No.  Turning it on, I discovered why off is default. When it on, it sometimes 
does surprising things on IDLE.  For instance, print('x') is (usually) a 
builtin and can not be stepped into.  However, it calls 
sys.stdout.write('x'+'\n').  Under Idle, user process sys.stdout is 
PyShell.Pseudofile, so when source is checked, 'step' on a line with print 
opens the file and highlights lines in the write method.

Step should ask before opening a file, and/or a 'smart step' is needed.

--
resolution:  -> not a bug
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Relaxed, or best-efforts JSON parser for Python?

2015-10-11 Thread Random832
Victor Hooi  writes:

> My question, is there a more lenient, or relaxed JSON parser available
> for Python, that will try to do a best-efforts parsing of non-spec
> JSON?

In an answer to a similar question on StackExchange, using YAML was
suggested.

http://stackoverflow.com/questions/9104930

Is it possible that this format is in fact YAML? It does have the spaces
after each colon as mentioned in a comment, and it seems more likely to
me than that a major package like MongoDB aimed for JSON and missed. 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Relaxed, or best-efforts JSON parser for Python?

2015-10-11 Thread MRAB

On 2015-10-12 01:56, Victor Hooi wrote:

Hi,

I'm attempting to parse MongoDB loglines.

The formatting of these loglines could best be described as JSON-like...

For example - arrays

Anyhow, say I had the following logline snippet:

 { Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 
2 } }, Collection: { acquireCount: { w: 1 } }, oplog: { acquireCount: { w: 1 } 
} }

This won't parse with json.loads() - the main issues is the missing quotation marks 
(") around the strings.

My question, is there a more lenient, or relaxed JSON parser available for 
Python, that will try to do a best-efforts parsing of non-spec JSON?


Have you tried first adding the quotes using the re module?

>>> import json, re
>>> line = '{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { 
acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 1 } }, oplog: 
{ acquireCount: { w: 1 } } }'

>>> json.loads(re.sub(r'(\w+)', r'"\1"', line))

--
https://mail.python.org/mailman/listinfo/python-list


Re: Strong typing implementation for Python

2015-10-11 Thread Michael Torrie
On 10/11/2015 06:34 PM, Steven D'Aprano wrote:
> That's called type inference, and there's nothing innovative about Swift to
> include that as a feature. Type inference is *old*. The theory behind type
> inference goes back to 1958, and languages such as ML and OCaml have
> included it for decades, and yet here we are in 2015 and people think that
> it's something cool and new :-(

C++ introduced it a while ago (C++11), and D has had it from the
beginning.  Even lowly FreeBasic has it.  It's certainly nice and it can
be a time saver. Though it's only useful in certain places, such as when
declaring a variable and an initializer.  While it can be used for the
return type of a function, in practice I've found it to not be that
useful when you are making a function that is going to be called by
someone else.  You can't just stick an automatic reference in a .h file,
for example.

Anyway, I guess our OP is another example of a drive-by poster who took
a brief look at Python then came here to try make a point of some kind,
and then disappeared, perhaps realizing that he probably should have
gained a bit more understanding of Python before trying to make said point.

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25194] Opt-in motivations & affiliations page for core contributors

2015-10-11 Thread Nick Coghlan

Nick Coghlan added the comment:

Additional feedback received off-list in response to the python-committers 
thread:

* the current preamble is still overly legalistic and could stand to be toned 
down (e.g. finding a friendlier word than "disclose" in a couple of places)

* the page doesn't really explain why it exists. There's hints of that in the 
"Limitations on Scope" section, but it would likely be better to have a more 
explicit "Goals of this page" section.

I'll draft an updated version of that and post it here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22726] Idle: add help to config dialogs

2015-10-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I rewrote the common section to explain what the button do. I did not modify 
the extensions dialog because I want to finish #24782.  #22707 may add more.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25194] Opt-in motivations & affiliations page for core contributors

2015-10-11 Thread Nick Coghlan

Nick Coghlan added the comment:

That's a good point about the current "3rd party bio" instructions being 
counterproductive - my goal is to capture "Why do we consider core development 
a good use of our time?" moreso than "What have we done in the past?".

So perhaps switching back to the first person model I used in the second draft 
would be a better idea?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >