A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20140607/96ff9c87/attachment-0001.html below:

<div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 7, 2014 at 5:50 AM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On 7 June 2014 19:36, Ram Rachum <<a href="mailto:ram.rachum@gmail.com">ram.rachum@gmail.com</a>> wrote:<br>

> My need is to have an infinite immutable sequence. I did this for myself by<br>


> creating a simple `count`-like stateless class, but it would be nice if that<br>
> behavior was part of `range`.<br>
<br>
</div>Handling esoteric use cases like it sounds yours was is *why* user<br>
defined classes exist. It does not follow that "I had to write a<br>
custom class to solve my problem" should lead to a standard library or<br>
builtin changing unless you can make a compelling case for:<br>
<br>
* the change being a solution to a common problem that a lot of other<br>
people also have. "I think it might be nice" and "it would have been<br>
useful to me to help solve this weird problem I had that one time"<br>
isn't enough.<br>
* the change fitting in *conceptually* with the existing language and<br>
tools. In this case, "infinite sequence" is a fundamentally incoherent<br>
concept in Python - len() certainly won't work, and negative indexing<br>
behaviour is hence not defined. By contrast, since iterables and<br>
iterators aren't required to support len() the way sequences are,<br>
infinite iterable and infinite iterator are both perfectly well<br>
defined.<br></blockquote><div><br></div><div>With all due respect, â€œ"infinite sequence" is a fundamentally incoherent</div><div>concept in Python” is a bit hyperbolic. Â It would be perfectly reasonable to have them, but they're not defined (yet).</div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div class=""><div class="h5"><br>
Cheers,<br>
Nick.<br>
<br>
--<br>
Nick Coghlan Â  | Â  <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a> Â  | Â  Brisbane, Australia<br>
</div></div></blockquote></div><br></div></div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4