• ###### JiPiBicommented on "Sum to infinity of a Geometric Sequence" kata

A random tests on negative rounded values failed. Another try with same code has been successfull.
I saw that it was already previously araised, and recently annouced as solved.
Still an issue ?

• ###### JiPiBicommented on "Even numbers in an array" python solution

Why not. Pls could you write a solution corresponding to your proposal

• ###### JiPiBicommented on "One Variable Second Degree Equation Solver " kata

Hi ,

just a remark about the desciption : as you clearly separate 2 cases : a==0 and a!=0, y'are not obliged to repeat if a==0 for the different subcases in the first case

• ###### JiPiBicommented on "Roguelike game 1 - stats and weapon" kata

Hi
I understood that in case of equality in damages between 2 weapons we have to select the first in alphabetic order ,
with python I got an error with that order and no error with the reverse alphabetic order

• ###### JiPiBicommented on "Full Metal Chemist #1: build me..." kata

c'est bien ce que j'avais cru comprendre :)

• ###### JiPiBicommented on "Full Metal Chemist #1: build me..." kata

with a little help from ChatGPT , I succeeded to obtain the result I wanted with a 2-stairs implementation of closure , one for the class and yours called by the first one

``````import inspect
def method_logger(method):
def wrapper(self, *a, **kw):
call   = method.__name__ if method.__name__!='__init__' else self.__class__.__name__
args   = ''.join( f', {v!r}' for v in a)
kwargs = ''.join( f', {k}={v!r}' for k,v in kw.items() )
print(f"{call}(self{args}{kwargs})")
return method(self, *a, **kw)
return wrapper

def class_logger(classe):
for method_name, method in inspect.getmembers(classe, inspect.isfunction):
setattr(classe, method_name, method_logger(method))
return classe

@class_logger
class Atom(object):

``````

what do you think of the result ?

without any connection : why did you use the term 'frenglish' in the discussions below ?

• ###### JiPiBicommented on "Full Metal Chemist #1: build me..." kata

not at ease with decorators.

must dig

• ###### JiPiBicommented on "Full Metal Chemist #1: build me..." kata

thanks for this generic helpfull closure.

• ###### JiPiBicommented on "Full Metal Chemist #1: build me..." kata

Simple concept, never used before on my side, but efficient, that takes more time than a simple print, especially to identify specifically both called methods and arguments.

I'm just at the beginning of this very funny kata, as an objects' fan I appreciate a lot.

At first I was trying to find more examples to see how atoms, added outside of branches are treated, especially how to deal with their id after the molecule's unlocking, but I had forgotten the possible use of the attribute atoms to memorize the creation's order.

• ###### JiPiBicommented on "Full Metal Chemist #1: build me..." kata

Hi
A general question about debugging classes:

• in a classical kata ,ie call of a funtion , you can print the arguments
• when working with classes, how can I capture the sequence of instructions of a specific test

• ###### JiPiBicommented on "Hungry Hippos" kata

Hi

Ok for basic tests , but why this board should return 0, for me it's 3 , but result is not accepted
'''
[[0, 1, 0, 0, 1],
[0, 0, 0, 1, 1],
[0, 0, 1, 1, 1],
[0, 0, 0, 1, 0],
[0, 1, 0, 0, 0]]
'''

• ###### JiPiBicommented on "Sort My Animals" python solution

y're right,works without, probably reflex or lazyness to improve a working code :)

• ###### JiPiBicreated an issue for "Circularly Sorted Array" kata

Hi
my code works with the present tests ,
but if the max of the array is simultaneously at the beginning and the end , it should fail :
so the tests should take that conf into account

• ###### JiPiBicommented on "80's Kids #6: Rock 'Em, Sock 'Em Robots" kata

Hi
Just a remark : robots are not objects as said in the Details, but dictionnaries : code is less simple
and if they were objects , we could have written a method for the fight

• ###### JiPiBicommented on "Log without dates" kata

what I didnt understood was that the error appeared only in the first random test. I will test now.
Edit : It works now, and I saw that you duplicate my code to check your fix.
If you had imposed that the input must remain unchanged, my code would have been different :)