News for hackers. Stuff that matters.
Re:Visualizing How Developers Rate Their Own Programming Skills by ThrustVectoring on Monday November 28, 2016 @07:21PM (#13059628)
Yeah, I've definitely developed an aesthetic taste for code cleverness. Like, one time I was writing some python and using third-party code that expects a list of user-provided classes. It was really annoying and I kept passing it a bare class which made things fail. I ended up making a class that behaves like a list containing itself, and it completely "fixed" the problem. That really shouldn't be production code, though.
Re:Visualizing How Developers Rate Their Own Programming Skills by hex13 on Tuesday November 29, 2016 @11:27PM (#13068490)
Why didn't you just pass one element list with your class with it, for example:

  class MyClass:
     pass

  class_list = [MyClass]
  third_party_function(class_list)
  # or just 
  third_party_function([MyClass])
?

creating some simple wrapper for third party function, e.g.

  def wrapper(C):
     third_party_function([C])
could also be much simpler solution :)

But it's maybe off topic.