54
wolfram
8y

Trying to keep my code reviewers entertained:

Comments
  • 5
    You're sneaky, entertaining douchebag
  • 12
    Same shit, yours is more readable
  • 1
    @bioDan look carefully, it's more than a syntactic sugar 😧
  • 14
    Previous dev. of my current work made these entertaining stuff, it was fun and all till i started fixing his legacy spaghetti code.
    If i find that fucker i'm gonna back-flip kick him in the face.
  • 5
    Reading this code has expanded my knowledge of Python capabilities.
    Did not know one could do

    #this:
    for a, b, c in x:

    #or this:
    return a for a in x

    #or even:
    return a for a in x for b in y

    very interesting indeed.

    Thanks, OP!
  • 0
    Why are there underscores after the variable names?
  • 2
    @kpenc yeah I thought that was strange too. I've seen class vars start with underscore in Python to make them private, but I didn't think it was standard to end any identifier with.
  • 1
    @corscheid private and protected(so called) members have underscores in the beginning, and some people use the convention of using underscore at the end when they change a variable in a class (if anyone of you have used Sci kit may know )
  • 0
    @wolfram interesting. I'm forever learning stuff on here. :)
  • 2
    @corscheid dude I'm also learning - see I'm at the pub and still devRant'ing! Don't judge the poor picture 😁
  • 0
    Byte of python ;)
  • 2
    Unless the second one has a better time complexity, yours is better due to readability xd
Add Comment