Re: [myhdl-list] Conversion of class methods
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2012-03-17 14:34:42
|
<snip> >> > > Hi Christopher, > > I wonder how you are messing up mercurial and branches. I find them > very easy and straight forward to use. Are you using plain mercurial > or a GUI such as TortoiseHg? I am one of the core TortoiseHg > developers, so do not hesitate to contact me if you need any help with > that. If you are not using it I'd love for you to give it a try. I > think it is quite helpful. If you are using it already and are having > problems with it I'd love to hear about them so that we can improve > things a little. Pretty sure it's a U.S.E.R error, I simply forgot to switch the branch before making my modifications and don't have enough mercurial savvy to remedy my errors. It is ok for now, these changes are in a development branch and I should be able to clean it up before creating a patch (if I get that far). > > In any case, if you ever find that you committed to the wrong branch, > you can use the MQ extension to "qrefresh" your commit, changing the > branch at will. Thanks, this is useful information. > > Coming back to the important part of your message, you are right that > calling the first method argument "self" is just a convention, not a > requirement. Nevertheless I've never seen any python code that does > not call the first method argument "self". Thus I don't think you > should worry too much about it. I think that it would be safe to make > that a requirement for MyHDL if you do not find a better way to > differentiate between funcions and class methods. > > As for your other questions, I find it a bit weird that the "signal > containers" MEP refers to "classes" as well. I don't think that > classes are normally considered containers even if strictly speaking > they are. Perhaps it is because they are so much more than that... So > my 0.02$ is that that part should be rolled into the MEP 108. What united the classes and other containers, in my mind, is how a Signal and numeric values embedded in a "container" is transformed. You are correct, a class can be a super set but it is also container. The MEP only covers the container part of the class, that is Signals, constants, and variables (?) as class attributes. > > I also think that it is perhaps a good idea to go the "baby steps" > route and make a first version that does not handle class attributes. > I believe that any progress is good progress. Having this feature, > even in a limited form, may already prove useful, and it may even give > you hints on how to proceed further later on. > > Cheers, > > Angel Thanks for the comments, Chris |