Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Foiltha
Jun 12, 2008
Any suggestions for a free decent UML tool, aimed at Python in particular? Code generation would be a plus.

Adbot
ADBOT LOVES YOU

Foiltha
Jun 12, 2008

JetsGuy posted:

I need to get better at remembering PEP8.

That code I posted above is a pretty fair approximation of how I stylistically code, for whatever that's worth.

I usually just run this before committing code and fix the flaws it points out: https://github.com/jcrocholl/pep8

Maybe it's time to hook up some Vim scripts do that while editing though.

Foiltha
Jun 12, 2008
What's the most Pythonic way of checking if all elements in a list are also present in another list?

I know I could probably do something like:

code:
all(element in second_list for element in first_list)
But is there a more clever way?

Edit: I also realized that this approach is O(n*m) which isn't exactly great.

Foiltha
Jun 12, 2008

QuarkJets posted:

There are other reasons, too. On Ubuntu there's almost no reason to build/install Python modules yourself, just use apt-get unless you want to do something special

There are two very good reasons and they're called pip and virtualenv.

  • Locked thread