• Awesome A.D.commented on "AST Series #3: The Missing Link" kata

I feel like this kata is just... not that interesting. It doesn't really teach anything about ASTs per se. After all, the error you get is incredibly Python specific. In particular, the requirement for line numbers is an implementation detail that has nothing to do with what ASTs are, or what you can do with them.

Beyond that, this kata is solveable with a quick scan of the documentation or a google search, and all it teaches is... Python AST nodes need line numbers. Woopdidoo.

Finally, this kata feels impossible to rate. In terms of true difficulty, it would be a white kata. But the domain is most certainly outside the knowledge requirements for beginners, so it has to be yellow. Either feels wrong.

Don't get me wrong, I like the idea of exploring the concept of ASTs, even if it's limited to just Python, but this feels more like "I encountered this error once, and now I'm going to make it part of this kata series, because I can't think of anything more interesting".

• S3V!commented on "Fix the code" kumite

def multiply(a,b):
result = a*b
return result
res = multiply (5,10)
print(res)

xd

help

• Vladobroscommented on "Fix the code" kumite

def multiply(a, b):
return a * b

• Polymorbismcommented on "Bingo ( Or Not )" haskell solution

I thought about doing it this waay but had no idea how to implement it in haskell, nice work!

• Pinnaclecommented on "Greetings!" kumite

it is, but 0 can be counted as `False`

• 0xArima57commented on "Greetings!" kumite

aaa.... right.... how on earth did I not notice that formal is s'posed to be a bool/

Fixed.

• Awesome A.D.created an issue for "Your first use of ast: Inspecting Python Functions" kata

Description is not consistent:

You will write a function `describe` taking a function's source code source as input, and will use Python's AST to grab information about it.
`describe_fn` will return an object: ....

The function name is `describe_fn` in the tests/solution, not `describe`.
Besides, what we're returning is a `dict`, not some `object`.

• Awesome A.D.created an issue for "Your first use of ast: Inspecting Python Functions" kata

Sample Tests expect a `body` key in the returned dict, test suite does not. If the key is included (simply with the input source as value), it fails random tests because those compare dict equality. If not included, sample tests error out.

• Blind4Basicscommented on "Your first use of ast: Inspecting Python Functions" kata

I don't think that's an issue. It's more work than the expected solution, so considering the probable rank of the kata, it's fine.

• Blind4Basicscreated an issue for "Your first use of ast: Inspecting Python Functions" kata

Hi,

The arguments names could be etracted in various ways and:

• list makes the order relevant => should be a set (or if you want to keep the old solutions valid, you can add to the description that the order won't be relevant, then you transform the vlist to a set inside the tests
• it's not specified what kind of arguments should be covered or not ("all" is a valid answer, "only ...3 is also a valid answer, but that has to be specified in any case):
• posonlyargs?
• args?
• vararg?
• kwonlyargs?
• kw_defaults?
• kwarg?

Cheers

• Martyn-Pearsoncommented on "Your first use of ast: Inspecting Python Functions" kata

There's another instance to correct in the Instructions section of the description...
"You will write a function describe taking a function's source code..."

Really enjoyed this kata though, thanks!

• dfhwzecommented on "Your first use of ast: Inspecting Python Functions" kata

I don't see how that should prevent the kata from approving. It's not like this results in an exploit of a high level kata. I wouldn't worry too much about such solutions on an easy kata.