r/PowerShell • • Sep 17 '20

PowerShell vs Python Reference

https://blog.ironmansoftware.com/powershell-vs-python/
206 Upvotes

51 comments sorted by

View all comments

11

u/[deleted] Sep 17 '20 edited Oct 09 '20

I've been using PowerShell extensively since 2014 and I had no idea you could declare your arguments in the function definition's opening parentheses. I always did it like:

function ass
{
    param
    (
        $has_donk = $true
    )
}

Even if this is better practice I'm just shocked I didn't know you could do it the "traditional" way.

4

u/[deleted] Sep 17 '20

Learn something new every day! I had to look up some PS stuff when I was compiling this list and comparing it with Python.