cascading python executions only if return code is 0

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Dec 22 22:54:53 EST 2013


On 23/12/2013 03:45, Chris Angelico wrote:
> On Mon, Dec 23, 2013 at 2:43 PM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
>> Another C thing to complain about, with functions like malloc the status
>> code and value returned are one and the same thing, except that NULL is
>> failure in this case.
>
> How's that a problem? Python has the same:

Remembering to check it?

>
> memory.get(1234)

You learn something new every day or April 1st come early?

>
> will return a bit of memory, or None if it can't get any. Not
> materially different. Remember, C doesn't have exceptions. In C++, the
> 'new' operator will throw an exception if it can't provide memory.
>
> ChrisA
>


-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list