Can Python function return multiple data?

Chris Angelico rosuav at gmail.com
Wed Jun 3 17:35:28 EDT 2015


On Wed, Jun 3, 2015 at 11:56 PM, Thomas Rachel
<nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de>
wrote:
> Am 03.06.2015 um 01:56 schrieb Chris Angelico:
>
>> and it's pretty convenient. In C, the nearest equivalent is passing a
>> number of pointers as parameters, and having the function fill out
>> values. Python's model is a lot closer to what you're saying than C's
>> model is :)
>
>
> At least, C functions can return structs...

Oh, yes, I forgot about that. Thought that was C++ but not C, partly
because I never do it in either language. Although in a sense, a
struct is still a single "thing".

ChrisA



More information about the Python-list mailing list