Re: [Python-Dev] for...else

2017-07-28 Thread Rob Cliffe



On 28/07/2017 20:57, MRAB wrote:

On 2017-07-28 10:17, Michel Desmoulin wrote:

elif break and elif None: I'd like that very much. It's weird a break
the semantic of break and None, but it's in such a dark corner of Python
anyway I don't bother.


Surely it would not be "elif break", but "elif not break"?
To me, anything beginning with "else" or "elif" suggests an alternative 
branch, not an additional one (YMMV):

if condition:
do_something
else:
do_something_completely_different

Therefore I would find "if not break" or even "and if not break" more 
intuitive.

Best wishes
Rob Cliffe




Le 27/07/2017 à 21:19, MRAB a écrit :

On 2017-07-27 03:34, Mike Miller wrote:



On 2017-07-26 16:36, MRAB wrote:

"nobreak" would introduce a new keyword, but "not break" wouldn't.


Whenever I've used the for-else, I've put a # no-break right next to
it, to
remind myself as much as anyone else.

for...: not break: is the best alternative I've yet seen, congrats. 
Perhaps in

Python 5 it can be enabled, with for-else: used instead for empty
iterables, as
that's what I expected the first few dozen times.


For empty iterables, how about "elif None:"? :-)

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com



---
This email has been checked for viruses by AVG.
http://www.avg.com


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] for...else

2017-07-28 Thread MRAB

On 2017-07-28 10:17, Michel Desmoulin wrote:

elif break and elif None: I'd like that very much. It's weird a break
the semantic of break and None, but it's in such a dark corner of Python
anyway I don't bother.


Surely it would not be "elif break", but "elif not break"?


Le 27/07/2017 à 21:19, MRAB a écrit :

On 2017-07-27 03:34, Mike Miller wrote:



On 2017-07-26 16:36, MRAB wrote:

"nobreak" would introduce a new keyword, but "not break" wouldn't.


Whenever I've used the for-else, I've put a # no-break right next to
it, to
remind myself as much as anyone else.

for...: not break: is the best alternative I've yet seen, congrats. 
Perhaps in

Python 5 it can be enabled, with for-else: used instead for empty
iterables, as
that's what I expected the first few dozen times.


For empty iterables, how about "elif None:"? :-)

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Summary of Python tracker Issues

2017-07-28 Thread Python tracker

ACTIVITY SUMMARY (2017-07-21 - 2017-07-28)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open6088 (+30)
  closed 36736 (+57)
  total  42824 (+87)

Open issues with patches: 2337 


Issues opened (72)
==

#26732: multiprocessing sentinel resource leak
http://bugs.python.org/issue26732  reopened by haypo

#28734: argparse: successive parsing wipes out nargs=? values
http://bugs.python.org/issue28734  reopened by paul.j3

#29512: regrtest refleak: implement bisection feature
http://bugs.python.org/issue29512  reopened by haypo

#30188: test_nntplib: random EOFError in setUpClass()
http://bugs.python.org/issue30188  reopened by haypo

#30778: test_bsddb3 crash on x86 Windows XP 2.7
http://bugs.python.org/issue30778  reopened by haypo

#30985: Set closing variable in asyncore at close
http://bugs.python.org/issue30985  opened by walkhour

#30986: Add --include-py argument to Tools/msi/make_zip.py
http://bugs.python.org/issue30986  opened by Segev Finer

#30987: Support for ISO-TP protocol in SocketCAN
http://bugs.python.org/issue30987  opened by Pier-Yves Lessard

#30988: Exception parsing invalid email address headers starting or en
http://bugs.python.org/issue30988  opened by timb07

#30989: Sort only when needed in TimedRotatingFileHandler's getFilesTo
http://bugs.python.org/issue30989  opened by Lovesh Harchandani

#30990: Calls to C functions using `.__call__` don't get sent to profi
http://bugs.python.org/issue30990  opened by ppperry

#30991: test_ctypes ,test_dbm and test_ssl  fail on arm64 (aarch64) ar
http://bugs.python.org/issue30991  opened by jonny789

#30992: Invalid PGP Key Prevents Archive Validation
http://bugs.python.org/issue30992  opened by cwprogram

#30995: Support logging.getLogger(style='{')
http://bugs.python.org/issue30995  opened by mitar

#30996: add coroutine AbstractEventLoop.sock_close
http://bugs.python.org/issue30996  opened by cfy

#30997: TestCase.subTest and expectedFailure
http://bugs.python.org/issue30997  opened by ronaldoussoren

#30999: statistics module: add "key" keyword argument to median, mode,
http://bugs.python.org/issue30999  opened by gerion

#31000: Test failure in resource module on ZFS
http://bugs.python.org/issue31000  opened by larry

#31001: IDLE: Add tests for configdialog highlight tab
http://bugs.python.org/issue31001  opened by terry.reedy

#31002: IDLE: Add tests for configdialog keys tab
http://bugs.python.org/issue31002  opened by terry.reedy

#31004: IDLE, configdialog: Factor out FontTab class from ConfigDialog
http://bugs.python.org/issue31004  opened by terry.reedy

#31005: caught and stored exception creates a reference cycle outside 
http://bugs.python.org/issue31005  opened by vojtechfried

#31006: typing.NamedTuple should add annotations to its constructor (_
http://bugs.python.org/issue31006  opened by Antony.Lee

#31007: ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.
http://bugs.python.org/issue31007  opened by haypo

#31008: FAIL: test_wait_for_handle (test.test_asyncio.test_windows_eve
http://bugs.python.org/issue31008  opened by haypo

#31010: test_socketserver.test_ForkingTCPServer(): threading_cleanup()
http://bugs.python.org/issue31010  opened by haypo

#31011: Users (except from the one who installed) not  able to see pyt
http://bugs.python.org/issue31011  opened by Debarshi.Goswami

#31012: suggestion: allow termination argument in argparse to be speci
http://bugs.python.org/issue31012  opened by Leon Avery

#31013: gcc7 throws warning when pymem.h development header is used
http://bugs.python.org/issue31013  opened by Gabriel Somlo

#31014: webbrowser._synthesize uses outdated calling signature for web
http://bugs.python.org/issue31014  opened by jmsdvl

#31015: PyErr_WriteUnraisable should be more verbose in Python 2.7
http://bugs.python.org/issue31015  opened by christian.aguil...@foundry.com

#31016: [Regression] sphinx shows an EOF error when using python2.7 fr
http://bugs.python.org/issue31016  opened by doko

#31020: Add support for custom compressor in tarfile
http://bugs.python.org/issue31020  opened by insomniacslk

#31021: Clarify programming faq.
http://bugs.python.org/issue31021  opened by terry.reedy

#31022: ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest
http://bugs.python.org/issue31022  opened by haypo

#31024: typing.Tuple is class but is defined as data inside https://do
http://bugs.python.org/issue31024  opened by Bernát Gábor

#31026: test_dbm fails when run directly
http://bugs.python.org/issue31026  opened by serhiy.storchaka

#31027: test_listcomps fails when run directly
http://bugs.python.org/issue31027  opened by serhiy.storchaka

#31028: test_pydoc fails when run directly
http://bugs.python.org/issue31028  opened by serhiy.storchaka

#31029: test_tokenize fails when run directly
http://bugs.python.org/issue31029  opened 

Re: [Python-Dev] for...else

2017-07-28 Thread Michel Desmoulin
elif break and elif None: I'd like that very much. It's weird a break
the semantic of break and None, but it's in such a dark corner of Python
anyway I don't bother.

Le 27/07/2017 à 21:19, MRAB a écrit :
> On 2017-07-27 03:34, Mike Miller wrote:
>>
>>
>> On 2017-07-26 16:36, MRAB wrote:
>>> "nobreak" would introduce a new keyword, but "not break" wouldn't.
>>
>> Whenever I've used the for-else, I've put a # no-break right next to
>> it, to
>> remind myself as much as anyone else.
>>
>> for...: not break: is the best alternative I've yet seen, congrats. 
>> Perhaps in
>> Python 5 it can be enabled, with for-else: used instead for empty
>> iterables, as
>> that's what I expected the first few dozen times.
>>
> For empty iterables, how about "elif None:"? :-)
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/desmoulinmichel%40gmail.com
> 
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com