QUOTE(Chadrik @ 03/06/08, 06:58 PM) [snapback]282273[/snapback]
no jojaa,
if something returns a list and there is nothing in the list, it should be an emtpy list -- not None.
Maybe, im just pointing out a lot of application api's do this. It probably stems out directly form c/c++ where they dont bother to make a list at all if theres nothing. Saving out even that last byte of memory. Im not taking any claim as to wethre its okay, its just rudimentary fact of life.*
I think whoever made the maya cmds was far more enamoured over the fact that they need it in python than leveraging python (or in other words it was made by c coders). No actual deep consideration for design has been put int it, wich makes it bad, pymel is better yes i agree but you cant really fix the problems by making a module on top of a botched process without writing every allmost single command anew in the api.
This kind of ideology clash happens everywhere all the time, so what is important to understand what IS versus what would be best. So yes something is harbrained log a bug, or feature request. And work on what you have. Mostly because C/c++ users have so much power oevr all development whilst their thinking is sometimes a but alien to say the least. The main problem is that if you now ask autdesk to change this they will claim they cant because so many users allready did the code. (wich is a ridiculous claim with wich i deal every F*ing day, it oes not matter who the comppany is things never go the way you want unless you do them yourself)
PS: by the way you can see c++ influence a lot in the factory mel scripts that are written as if the code was c NOT mel, wich makes it un optimal at places.
PPS: theres far more of theese kinds of glitches in the maya python api. But again it more reflects the nature of the porters than python ideology. This seems to be a recurring trend, we cant get away of. Where a piece of brilliant ideological view eventually dies when the thing is started to be use en masse, which is why theres always new languages springing up as the old ones become a total mess. Its happened now 8 times in 8 different scenarios where ive closely worked on it (but this happens in the world all the time allmost daily it seems). And yes it sucks but it happens no matter what i do about it. Then everything is crap for 5-15 years until en masse catch up with the right thinking and then everything is scrapped again back to the way it was 5-15 years ago, retaining some of the legacy problems. Somehow quite naturally its allways easy to keep idology in sync as long as the user group is relatively uniform in education and philosophical background but then allways come the guys who dont care for the philosophy but just that it works... But see you cant separrate the two without making a mess out of things.
Anyway in mayas original design ideology the scripting interface is static and the c++ api is free to evolve over glitches like this freely. Where do you want the python to lie. See the problem with changing the api is that everything old ceases to function. Coders can understand this but these that write script just as some 10 second interlude rarely have capacity nor care.
- I am aware that my position on things may seem sometimes totally ambiguous, but its a mix of realism with ideological view. So my position is this: If you make something make it the best you can, however once its made bad theres no use for me bitching about the limitation design flaw if theres nothing i can do about it RIGHT NOW. Because ultimately im not interested in the effect of something that may or may not happen. Its a another deal altogether if they'd ask me what would you want it to be like. Unfortunately this world view extends over to not trying to breathe life into a solution thats not desirable.