[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-ideas
Subject:    Re: [Python-ideas] 0-base and 1-base indexed iterables? Custom slicing rules?
From:       pedro santos <probiner () gmail ! com>
Date:       2015-03-24 10:31:12
Message-ID: CAMrmD0ro=NY07hhsObU4yGR1t4Tr_FNBKbAg-JJazAJOOtA4AA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


*Newbie slowly steps down from the table*

I guess then 1-indexing in most cases the it's something relegated to
fleshing, so that the index offset is done on the user level and not at the
code level. Yes because no one will pick a gambling dice with face 0 :P
I guess it's a matter of brain education... I did fell I needed to run a
bunch of tests just to re-assure myself about the 1-indexed problem being
solved with a 0-base representation. But I totally understand the arguments
presented here as code consistency also makes it more malleable and
somewhat more black-boxy. As someone that deals a lot with vectors with
linear color workflows I know that what could be a clean work environment
can be become a minefield of conversion routines that add an overhead to
the brain when trying to operate Frankenstein operations into data flow
setups.

Thanks for the extra discussion, especially when indexing was addressed
separately from slicing routines.

Cheers

On Sun, Mar 22, 2015 at 7:52 PM, David Mertz <mertz@gnosis.cx> wrote:

> The strongest proof that mixed index bases are a bad idea is that this is
> a valid statement in VB6:
>
>   Dim array(1 to 10) as Integer
>
> For all X, if VB6 allows X, then X is a bad idea. :-)
>
> --
> Keeping medicines from the bloodstreams of the sick; food
> from the bellies of the hungry; books from the hands of the
> uneducated; technology from the underdeveloped; and putting
> advocates of freedom in prisons.  Intellectual property is
> to the 21st century what the slave trade was to the 16th.
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 




*------------------------------[image:
http://i153.photobucket.com/albums/s202/animatics/probiner-sig.gif]Pedro
Alpiarça dos Santos Animator  3DModeler  Illustrator >>
http://probiner.x10.mx/ <http://probiner.x10.mx/>*

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra" style="font-size:12.8000001907349px">*Newbie \
slowly steps down from the table*<br><br>I guess then 1-indexing in most cases the \
it&#39;s something relegated to fleshing, so that the  <span class="">index</span>  \
offset is done on the user level and not at the code level. Yes because no one will \
pick a gambling dice with face 0 :P<br>I guess it&#39;s a matter of brain \
education... I did fell I needed to run a bunch of tests just to re-assure myself \
about the 1-indexed problem being solved with a 0-base representation. But I totally \
understand the arguments presented here as code consistency also makes it more \
malleable and somewhat more black-boxy. As someone that deals a lot with vectors with \
linear color workflows I know that what could be a clean work environment can be \
become a minefield of conversion routines that add an overhead to the brain when \
trying to operate Frankenstein operations into data flow setups.<br><br>Thanks for \
the extra discussion, especially when indexing was addressed separately from slicing \
routines.</div><div class="gmail_extra" \
style="font-size:12.8000001907349px"><br>Cheers</div><div \
class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 22, 2015 at 7:52 PM, \
David Mertz <span dir="ltr">&lt;<a href="mailto:mertz@gnosis.cx" \
target="_blank">mertz@gnosis.cx</a>&gt;</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 \
dir="ltr">The strongest proof that mixed index bases are a bad idea is that this is a \
valid statement in VB6:<div><br></div><div>   Dim array(1 to 10) as \
Integer</div><div><br></div><div>For all X, if VB6 allows X, then X is a bad idea. \
:-)</div><span class=""><font color="#888888"><div><br><div class="gmail_extra">-- \
<br><div>Keeping medicines from the bloodstreams of the sick; food <br>from the \
bellies of the hungry; books from the hands of the <br>uneducated; technology from \
the underdeveloped; and putting <br>advocates of freedom in prisons.   Intellectual \
property is<br>to the 21st century what the slave trade was to the 16th.<br></div> \
</div></div></font></span></div> \
<br>_______________________________________________<br> Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" \
target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br> Code of \
Conduct: <a href="http://python.org/psf/codeofconduct/" \
target="_blank">http://python.org/psf/codeofconduct/</a><br></blockquote></div><br><br \
clear="all"><div><br></div>-- <br><div class="gmail_signature"><div \
dir="ltr"><div><font face="verdana, helvetica, sans-serif"><b><span \
style="font-weight:normal"><b><span style="font-weight:normal"><hr><table \
style="border-collapse:collapse;border:none" cellpadding="0" cellspacing="0" \
border="0"><tbody><tr><td style="width:62.1pt;padding:0cm 5.4pt" valign="top" \
width="83"><div style="margin-bottom:0.0001pt;line-height:normal"><img \
alt="http://i153.photobucket.com/albums/s202/animatics/probiner-sig.gif" \
src="http://i153.photobucket.com/albums/s202/animatics/probiner-sig.gif"><br></div></td><td \
style="width:370.1pt;padding:0cm 5.4pt" valign="top" width="493"><div><span \
style="color:rgb(153,153,153)"><span style="line-height:15px"><span \
style="font-weight:normal"><font style="font-size:16px" face="&#39;lucida \
console&#39;, sans-serif"><span \
style="font-family:verdana,helvetica,sans-serif;font-weight:normal"><font>Pedro \
Alpiarça dos Santos</font>  </span></font></span></span></span><b \
style="line-height:15px"><span style="font-weight:normal"><font \
style="font-size:16px" face="&#39;lucida console&#39;, sans-serif"><b><span \
style="font-family:verdana,helvetica,sans-serif;font-weight:normal"><br><span \
style="color:rgb(204,204,204)"><font>Animator   3DModeler   Illustrator  \
</font></span><br><font size="1"><font color="#FF0000">&gt;&gt;   </font><span><font \
style="color:rgb(255,128,128)" color="#FF8080"><a rel="nofollow" \
style="color:rgb(255,128,128)">http://probiner.x10.mx/</a></font></span></font></span></b></font></span></b><span><a \
rel="nofollow" href="http://probiner.x10.mx/" \
target="_blank"><span></span></a></span></div></td></tr></tbody></table></span></b><div></div><br></span></b></font></div></div></div>
 </div></div>



_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic