Re: [Python-Dev] while:

2005-07-20 Thread Martin Blais
On 7/20/05, Facundo Batista <[EMAIL PROTECTED]> wrote:
> On 7/20/05, Martin Blais <[EMAIL PROTECTED]> wrote:
> 
> > it got me wondering, wouldn't it be nice if
> >
> >while:
> >   ...
> >
> > behaved as:
> >
> >while True:
> 
> -1
> 
> Explicit is better than implicit.

Well, maybe you're reading a bit too litterally into that statement. 
To me the expression is very explicitly absent :-)More seriously,
reading into these rules too literally leads to funny places: I could
ask why at the end of functions there is an implicit "return None"
(I'm not expecting an answer).  Explicit better than implicit?

The Rule of Least Surprise says to me that "while:" would do the least
unexpected thing.  There are only two possibilities: the test is
implicitly false, in which case "while:" would make no sense (i.e. the
block would be ignored).  Therefore the other only sensible case is
that the test is implicitly true, which can be useful (and also
happens to be a very common idiom).

It's not so much about saving typing characters: it's just low-hanging
fruit that simplifies the language a little bit (well, "simplify" is
arguable though, if you consider the grammar it makes it a tiny bit
more complex, but that is usually not the programmer's point-of-view).

Bah, whatever, +0

cheers,
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] while:

2005-07-20 Thread Facundo Batista
On 7/20/05, Martin Blais <[EMAIL PROTECTED]> wrote:

> Well, maybe you're reading a bit too litterally into that statement.
> To me the expression is very explicitly absent :-)More seriously,
> reading into these rules too literally leads to funny places: I could
> ask why at the end of functions there is an implicit "return None"
> (I'm not expecting an answer).  Explicit better than implicit?

See your point.

But, for me (spanish speaker), if I read a ``while:``, I think, "while what?".

.Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Weekly Python Patch/Bug Summary

2005-07-20 Thread Kurt B. Kaiser
Patch / Bug Summary
___

Patches :  350 open ( +1) /  2882 closed ( +2) /  3232 total ( +3)
Bugs:  889 open ( -8) /  5141 closed (+22) /  6030 total (+14)
RFE :  189 open ( -5) /   178 closed ( +8) /   367 total ( +3)

New / Reopened Patches
__

Add unicode for sys.argv, os.environ, os.system  (2005-07-02)
CLOSED http://python.org/sf/1231336  reopened by  loewis

Fix LINKCC (Bug #1189330)  (2005-07-15)
   http://python.org/sf/1239112  opened by  Christoph Ludwig

Prevent race condition in os.makedirs  (2005-07-17)
   http://python.org/sf/1239890  opened by  Nir Soffer

release lock on exception in threading.Thread.join()  (2005-07-18)
   http://python.org/sf/1240614  opened by  Dirk Groeneveld

Patches Closed
__

Patch for potential buffer overrun in tokenizer.c  (2005-01-13)
   http://python.org/sf/1101726  closed by  doerwalter

Add unicode for sys.argv, os.environ, os.system  (2005-07-02)
   http://python.org/sf/1231336  closed by  loewis

Optimization for textwrap  (2005-05-26)
   http://python.org/sf/1209527  closed by  rhettinger

New / Reopened Bugs
___

email.Generator traceback in forwarded msg  (2005-07-12)
   http://python.org/sf/1236906  opened by  Skip Montanaro

Missing sk_SK in windows_locale  (2005-07-13)
   http://python.org/sf/1237015  opened by  Lukas Lalinsky

link path probs on OSX re: Tcl, Tk & fink's /sw  (2005-07-13)
   http://python.org/sf/1237697  opened by  blakers

threading.Thread uses {} as default argument  (2005-07-14)
CLOSED http://python.org/sf/1238170  opened by  Simon Dahlbacka

manual.cls contains an invalid pdf-inquiry  (2005-07-14)
   http://python.org/sf/1238210  opened by  Michael Schindler

freed pointer is used in longobject.c:long_pow()  (2005-07-15)
CLOSED http://python.org/sf/1238681  opened by  Luke

subprocess.Popen fails inside a Windows service  (2005-07-15)
   http://python.org/sf/1238747  opened by  Adam Kerrison

Win registry problem  (2005-07-15)
   http://python.org/sf/1239120  opened by  Bruce Sherwood

Win registry problem  (2005-07-15)
CLOSED http://python.org/sf/1239148  opened by  Bruce Sherwood

Install Error: "cannot compute sizeof (int), 77"  (2005-07-15)
   http://python.org/sf/1239186  opened by  Bob Gazzale

email.Utils.formatdate documetaion missing  (2005-07-17)
CLOSED http://python.org/sf/1239681  opened by  Nir Soffer

distutils: MetroWerks support can go  (2005-07-17)
   http://python.org/sf/1239948  opened by  Jack Jansen

Distutils does not use logging  (2005-07-19)
   http://python.org/sf/1241006  opened by  Giles Antonio Radford

StreamReader broken for byte string to byte string codecs  (2005-07-20)
CLOSED http://python.org/sf/1241507  opened by  Graham Horler

garbage collection asserts failing  (2005-07-20)
   http://python.org/sf/1241545  opened by  munder12

-m does not find dotted modules  (2005-07-20)
CLOSED http://python.org/sf/1241619  opened by  Giles Antonio Radford

Bugs Closed
___

debug info file descriptor of tarfile is inconsistent  (2005-07-09)
   http://python.org/sf/1235266  closed by  birkenfeld

missing Py_DECREF in PyObject_CallMethod  (2005-06-29)
   http://python.org/sf/1229429  closed by  mwh

Mistakes in online docs under "5.3 Pure Embedding"  (2005-07-05)
   http://python.org/sf/1232768  closed by  birkenfeld

tkFileDialog.askopen... fails when dir=""  (2005-07-07)
   http://python.org/sf/1233799  closed by  birkenfeld

Carbon.FSSpec.as_pathname() crashes  (2005-07-11)
   http://python.org/sf/1236090  closed by  jackjansen

segfault/assert in tokenizer  (2004-12-21)
   http://python.org/sf/1089395  closed by  doerwalter

threading.Thread uses {} as default argument  (2005-07-14)
   http://python.org/sf/1238170  closed by  birkenfeld

some latex reject the pdfinfo  macro while generating html  (2004-11-22)
   http://python.org/sf/1071094  closed by  birkenfeld

freed pointer is used in longobject.c:long_pow()  (2005-07-15)
   http://python.org/sf/1238681  closed by  tim_one

Win registry problem  (2005-07-15)
   http://python.org/sf/1239148  closed by  bsherwood

email.Utils.formatdate documetaion missing  (2005-07-17)
   http://python.org/sf/1239681  closed by  montanaro

"k" specifier in PyArg_ParseTuple incomplete documentated  (2004-11-07)
   http://python.org/sf/1061920  closed by  birkenfeld

"article id" in description of NNTP objects  (2004-08-24)
   http://python.org/sf/1015140  closed by  birkenfeld

Missing urllib.urlretrieve docs  (2004-08-24)
   http://python.org/sf/1014761  closed by  birkenfeld

refman doesn't know about universal newlines  (2005-01-10)
   http://python.org/sf/1099363  closed by  birkenfeld

7.5.6 Thread Objects is too vague  (2004-03-09)
   http://python.org/sf/912943  closed by  birkenfeld

os.access() documentation should stress race conditions  (2004-01-08)
   htt