(Mar-18-2017, 10:23 AM)wavic Wrote: I still don't get it. Can you convert lambda x: (0, x) if isinstance(x, (int, float)) else (1, str(x)))
to a normal function, please
def sortkey(x): return (0,x) if isinstance(x, (int, float)) else (1, str(x))Or in slow-motion:
def sortkey(x): if isinstance(x,int) or instance(x,float): return (0,x) else: return (1, str(x))
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net