Re: "...Learning with Python" ...a property that addition andmultiplication have...
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: "...Learning with Python" ...a property that addition andmultiplication have...

From: Steven Bethard <steven.bethard@gmail.com>
Date: Thu May 26 2005 - 22:22:04 CEST

GMane Python wrote:
> string repetition can not repeat a value negative times:
> 'hello' * -3 is invalid.

Well, it's not invalid:

py> 'a' * -1
''
py> 'a' * -42
''

but you could definitely say that
     S * N1 == S * N2
does not imply that
     N1 == N2

STeVe
Received on Thu Sep 29 16:14:32 2005