1 |
On Tue, May 21, 2013 at 12:33:28PM +0200, Dmitry Selyutin wrote: |
2 |
> Even more, I'd like to avoid some generators and provide this |
3 |
> support manually: I've always hated generators, especially code |
4 |
> generators (and GUI ones). |
5 |
|
6 |
Generators? Are you referring to 2to3? I think anyone converting a |
7 |
Python project from Python 2 to Python 3 would be cray not to use it. |
8 |
They'd also be crazy if they just assumed that it generated optimal |
9 |
code ;). It's best to run it, and then go double check to make sure |
10 |
all the changes are meaningful. Keep stuff like [1]: |
11 |
|
12 |
- raise CatalystError, "Could not open file " + filename |
13 |
+ raise CatalystError("Could not open file " + filename) |
14 |
|
15 |
but drop stuff like: |
16 |
|
17 |
- for x in self.values.keys(): |
18 |
+ for x in list(self.values.keys()): |
19 |
|
20 |
Cheers, |
21 |
Trevor |
22 |
|
23 |
[1]: Although see 305cde6 (Massive pyflakes import cleanup and broken |
24 |
CatalystError calls, 2013-01-19) in dolsen's branch. There will |
25 |
also be lots of `print ...` → `print(...)` changes, which are |
26 |
needed unless we replaced them with calls to a logging logger |
27 |
[2]. |
28 |
[2]: http://thread.gmane.org/gmane.linux.gentoo.catalyst/2085/focus=2103 |
29 |
|
30 |
-- |
31 |
This email may be signed or encrypted with GnuPG (http://www.gnupg.org). |
32 |
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy |