Python Forum
special results from calling a function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
special results from calling a function
#1
it's certainly possible to get multiple answers from a called function by having it return a dictionary. but what about an extra, special, result in addition to the main result, while the main result might already be commonly used before this extra result is being implemented and used deep in the middle of a big expression.

long before i encountered Python i had been designing my own language. i still think along those lines when i encounter various issues. i had an idea in that language where a kind of keyword argument could be used for that. i did this in C a lot with "store-back pointers". it might be done with : instead of = in the argument list. there would need to be something special in the function code, too. but, my thinking didn't go that far.

i just added a keyword to pass a dictionary to store all the extra results into. simple enough.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to give input parameters value while calling the function[VI.Call()] as well? SARAVANAN_M 0 2,007 May-20-2019, 10:01 AM
Last Post: SARAVANAN_M

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020