5 kyu
Python Reflection: Disassembling the secret
333Voile
Loading description...
Reflection
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Nice kata! Should have added more random tests
I've got to say that even if I'm not a big fan of these kind of find out what's in the black box katas it's really instructive figuring it out.
This comment has been hidden.
This has already been answered below:
example_secret
is for testing your code only, it's not used for actual testing.Anyways, this is not an issue, please raise inqueries about your code (unless you can definitely prove it's the kata's fault) as a question next time.
(Also, you should go do some white katas instead)
solved it ... AlhumdiliLLAH
Nice challenge.
python new test framework is required. updated in this fork
Approved
Why
return globals[example_secret]
passes the first test but fails all random tests?The example test and
example_secret
is only there for you to test your code, not for actual testing ;-)This comment has been hidden.
I have the same problem, the sample test passes and all other fails.
I completed the kata, but I would like to know when would you actually use this?
What is this for?
https://stackoverflow.com/a/49771
;-)
is any text I can read to guide me on this?
The kata title already gave a big hint.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
The string I get for sample test is correct but for all other tests I dont get the correct string.
This comment has been hidden.
I don't understand why my code is failing with no error message :(
This comment has been hidden.
This comment has been hidden.
Someday I'll solve this kata and be able to see your reply... someday...
uh, nvm, your reply became visible when I replied to you. guess I know what to do now :/
Very nice. This kata opened up a whole new side of Python for me. Thank you.
approved
Thanks ;-)
Nice kata, refreshingly different, but tricky to rank
This comment has been hidden.
Fixed.
(I forgot to put them in a closure)
I still have a problem with it. The string returned for sample test is correct but not for other tests.
Damn, not knowing anything about that before doing the kata, it was hard... ;o
But that was perfect to learn new stuff, thanks a lot! :) (to bad I won't practice it. I'll forget about that after some weeks, I guess... :/ )
Someone mentioned to me before that there are a really lack of Python metaprogramming/reflection katas (unlike, you know, that magical being called Ruby).
So we gotta make more of them! ;-)