Skip to content

[function] explanation of pargs required #209

Answered by ThereforeGames
mrkrunkles asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mrkrunkles,

Thank you for reaching out.

Let me try to address your question about using custom arguments with [function] - it's a little complex, so bear with me:

  • Pargs, or positional arguments, can be passed into [function] to set boolean (i.e. true/false) variables to True. For example, if you declare [function my_func some_parg], and then [call my_func], the variable some_parg will automatically be True and ready for use within your function.

  • I think what you're looking for are kwargs, or keyword arguments. You can set these to anything you want and you can give them default values. Let's modify your example:

[function my_func some_kwarg="these are the default words"]
[get so…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mrkrunkles
Comment options

@redactedaccount
Comment options

@ThereforeGames
Comment options

Answer selected by mrkrunkles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants