1 |
On Tue, 2013-05-21 at 07:20 -0400, W. Trevor King wrote: |
2 |
> On Tue, May 21, 2013 at 12:33:28PM +0200, Dmitry Selyutin wrote: |
3 |
> > Even more, I'd like to avoid some generators and provide this |
4 |
> > support manually: I've always hated generators, especially code |
5 |
> > generators (and GUI ones). |
6 |
> |
7 |
> Generators? Are you referring to 2to3? I think anyone converting a |
8 |
> Python project from Python 2 to Python 3 would be cray not to use it. |
9 |
> They'd also be crazy if they just assumed that it generated optimal |
10 |
> code ;). It's best to run it, and then go double check to make sure |
11 |
> all the changes are meaningful. Keep stuff like [1]: |
12 |
> |
13 |
> - raise CatalystError, "Could not open file " + filename |
14 |
> + raise CatalystError("Could not open file " + filename) |
15 |
> |
16 |
> but drop stuff like: |
17 |
> |
18 |
> - for x in self.values.keys(): |
19 |
> + for x in list(self.values.keys()): |
20 |
> |
21 |
> Cheers, |
22 |
> Trevor |
23 |
> |
24 |
> [1]: Although see 305cde6 (Massive pyflakes import cleanup and broken |
25 |
> CatalystError calls, 2013-01-19) in dolsen's branch. There will |
26 |
> also be lots of `print ...` → `print(...)` changes, which are |
27 |
> needed unless we replaced them with calls to a logging logger |
28 |
> [2]. |
29 |
> [2]: http://thread.gmane.org/gmane.linux.gentoo.catalyst/2085/focus=2103 |
30 |
> |
31 |
|
32 |
I too was thinking of converting to using loggers. I want it to be |
33 |
something that is easy to re-direct. In that way it would be easier for |
34 |
alternate front-ends to be created. One such possibility could be a web |
35 |
front end or other server driven monitoring application. |