RE: First commit to spltools, a python package for working with Splinterlands data.

You are viewing a single comment's thread:

Especially when you get to code to retrieve all balances for example.

This needs more than one call to the spl api at this point you need to address a back-off/retry strategy. Also if for some reason the spl api gives a other return then successful like 502.

No problem with using my code as inspiration or copy/paste 😁, I'm also not official developer just learning as wel.

I also like camelcase more for my java programs 🤣.

This is what chatgpt think PEP8 should look like for class functions and variables.

class MyClassName:
    """A simple example class following PEP 8 style."""

    def __init__(self, first_value, second_value):
        """Initialize the class with two variables."""
        self.first_value = first_value
        self.second_value = second_value

    def calculate_sum(self):
        """Calculate the sum of the two values."""
        return self.first_value + self.second_value

# Usage
my_object = MyClassName(first_value=10, second_value=20)
result = my_object.calculate_sum()

print(f"The sum is: {result}")

But using classes and going object oriented (OOP) with python is another great topic on what todo with it😁.



0
0
0.000
0 comments