Fix Python – Should __ne__ be implemented as the negation of __eq__?

I have a class where I want to override the __eq__ method. It seems to make sense that I should override the __ne__ method as well. Should I implement __ne__ as the negation of __eq__ as such or is it a bad idea?
class A:

def __init__(self, state):
self.state = state

def __eq__(self, other):
return self.state == other.sta….

Fix Python – Implementing slicing in __getitem__

I am trying to implement slice functionality for a class I am making that creates a vector representation.
I have this code so far, which I believe will properly implement the slice but whenever I do a call like v[4] where v is a vector python returns an error about not having enough parameters. So I am trying to figure out how to define the getit….

Fix Python – How to get method parameter names?

Given the Python function:
def a_method(arg1, arg2):
pass

How can I extract the number and names of the arguments. I.e., given that I have a reference to func, I want the func.[something] to return (“arg1”, “arg2”).
The usage scenario for this is that I have a decorator, and I wish to use the method arguments in the same order that they appea….