gedizgursu@gmail.com wrote: > m and n are lists or dicts or enumerates or classes or anything it can be > assigned like > following: > instead of : > m.a=n.a; > m.b=n.b; > m.c=n.c; > ... > I suggest: > a,b,c of m to n ; > I thought of this while writing something in javascript since I love pyhton > above > everything I can type (even more than native language sentences) I wanted to > post this > idea to here > It is my first idea while coding ... > In javascript, I was assinging a boundingBoxRect values to a div it was going > like > this: > adiv=document.createElement("div") > adiv.style.x=comp.x; > adiv.style.y=comp.y; > adiv.style.height=comp.height; > adiv.style.widht=comp.width; > I thought it is super waste of time instead of : > x,y,height,width of comp to adiv;
How about something like… setattrs(adiv.style, getattrs(comp, 'x y height width') where `getattrs` returns a dict and `setattrs` accepts a mapping? That could be done now without adding any new features to the language. These functions could be added to the standard library somewhere if they should become official things. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/N6YG43COFMKHT2KYVOJWCCOXAT4UJDGW/ Code of Conduct: http://python.org/psf/codeofconduct/