Python's and and Pythons or
Ethan Furman
ethan at stoneleaf.us
Thu Oct 10 09:33:31 EDT 2013
On 10/10/2013 12:43 AM, Terry Reedy wrote:
> On 10/10/2013 2:45 AM, Chris Angelico wrote:
>> On Thu, Oct 10, 2013 at 5:12 PM, Peter Cacioppi
>> <peter.cacioppi at gmail.com> wrote:
>>> I'm trying to think of a good example usage of echo-argument and. Maybe something like
>
>>> A bit awkward, echo-argument or is more naturally useful to me then echo-argument and.
>>
>> first_element = some_list[0] # Oops, may crash
>
> some_list[0:1] always works, and sometimes is usable, but you still cannot index the slice.
Not if some_list is None, False, or another non-indexable type.
--
~Ethan~
More information about the Python-list
mailing list