Need some special built-in function in Pymite

68 views
Skip to first unread message

Krunal Patel

unread,
Dec 24, 2013, 2:15:25 AM12/24/13
to python-o...@googlegroups.com
Hi,

I have ported Pymite on my Marvel board and it's working fine.

But porting my exist python project on Marvel board, I need some basic built-in function Like :
isinstance
bool
bytes
classmethod
issubclass
max
min
property
repr
round
set
sorted
str
tuple
etc...

If I am not wrong then these are not supported in latest pymite library. Can we add these function in Pymite library ? if yes, then can any one guide me? so, i can start working on it.

Thanks,
Krunal

Dean Hall

unread,
Dec 27, 2013, 12:49:15 PM12/27/13
to python-o...@googlegroups.com
You're right, those fxns aren't available.
The PyMite VM is just the VM. p14p does not have the extensive library that CPython has.

property and classmethod won't be useful as there is no such distinction among static methods and class methods in the VM.
Nor are there magic setter and getter builtins.

str and tuple aren't functions so much as class constructors. So those won't be easy until PyMite gets unified type/classes.

!!Dean
> --
> --
> You are subscribed to the "python-on-a-chip" (or p14p for short) Google Group.
> Site: http://groups.google.com/group/python-on-a-chip
>
> ---
> You received this message because you are subscribed to the Google Groups "python-on-a-chip" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to python-on-a-ch...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Krunal Patel

unread,
Dec 28, 2013, 3:48:07 AM12/28/13
to python-o...@googlegroups.com
Dear Dean,

Thanks for reply.

Is there any way we can add feature like 'property' , 'isinstance' , 'staticmethod' and 'super' in Pymite library ? If yes, can you guide me to change Pymite library core for adding these built-in function?

-Krunal

Dean Hall

unread,
Dec 28, 2013, 9:20:47 AM12/28/13
to python-o...@googlegroups.com
What I'm saying is that the infrastructure isn't in place to support most of these functions.  So there is no easy way to add them.

Except min, max for integers.  That's very easy.

!!Dean
Reply all
Reply to author
Forward
0 new messages