How do you read `*args` out loud in the context of a #Python function signature?
PLEASE reply with how you'd read it, I'm trying to prove someone wrong π€£
Boosts are appreciated :D
How do you read `*args` out loud in the context of a #Python function signature?
PLEASE reply with how you'd read it, I'm trying to prove someone wrong π€£
Boosts are appreciated :D
@mathsppblog if I read it in my head, I think I just say "args". But if I read it to someone else, I'll say "star args".
(Same with **kwargs/kwargs/star star kwargs by the way)
@bmispelon @mathsppblog Kind of the same for me - in my head it's just "args", but if I'm talking to someone where there is any chance it might be misunderstood, I'll usually say "positional arguments" or something explicit.
@mathsppblog depending if it's clear in the context, either:
- eff star args
- eff open parenthesis star args close parenthesis
Or maybe even:
- eff of star args (after the mathematical way of reading "eff of x" for f(x) )
@mathsppblog honestly a bit like a pirate. Arrrgs. Not super long but more than args .
I didnβt even notice or consider the star until reading the comments of others.
@pwloftus that's hilarious! The pirate stuff, I mean π
What if you're dictating something like `f(*args)` to someone? What would you say?
@mathsppblog I think that would change slightly and maybe be context dependent.
Someone familiar with python probably βfarrgsβ just slightly extended.
Dictation desiring all characters captured and unsure if fargs would be understood.
Ef paren star eh are gee es close paren.
I might slip up and say the word function instead of f.
If weβre talking kwargsβ¦ at this point I feel I should just be silly and go:
GWARS! and flash these: π€
Stargs, Quargs and Arguv. Same for C and kowt and ker rbh
@mathsppblog I have heard people say, "star args" enough times to probably say that to Python devs.
In the real world, I would say, "the asterisk symbol args" because we are not monsters.
def foo(βargs, ββkwargs):
pass
@bmispelon @mathsppblog *οΈβ£args and *οΈβ£*οΈβ£kwargs but it's pronounced "emoji asterisk args" and "emoji asterisk asterisk kwargs"
I think we invented a new programming language.
I think π could be private variables. π€
@webology @bmispelon I'm on board with making π private variables.
Then, how about π for global variables?
@mathsppblog @bmispelon I think we need to kickstart a new programming keyboard β¨οΈ where every emoji of our language has a dedicated key.
That way, with every major language upgrade, we make money from selling them a bigger keyboard. πΈ
@mathsppblog "*args" is "splat args" for me.
By extension "** args" is "splat splat args". Obviously.
@mathsppblog I certainly met "splat" outside of Python; could have been ...
Perl 5βs list-flattening and reference-taking design choices, 20171129,
by Aristotle,
https://blogs.perl.org/users/aristotle/2017/11/perl5-refs-flattening.html
... where I might have picked it up.