Re: [pyjs-users] Re: Error: generator send() not supported

42 views
Skip to first unread message
Message has been deleted
Message has been deleted
Message has been deleted

Kees Bos

unread,
Nov 19, 2013, 11:18:59 AM11/19/13
to pyjs-...@googlegroups.com
This will require quite some work to get it fixed...

On Sun, 2013-11-17 at 22:26 -0800, Clavier wrote:
> It is another example showing the difference of generator references
> (g, self.g, and (g,)).
>
>
> #file name: test_generator.py
> import pyjd # this is dummy in pyjs.
> class GUI():
> def onModuleLoad(self):
> g=test_generator()
> self.g=g
> self.g_tuple=(g,)
> print 'g=%s, type(g)=%s' % (g, type(g))
> print 'self.g=%s, type(self.g)=%s' % (self.g,
> type(self.g))
> print 'self.g_tuple[0]=%s, type(self.g_tuple[0])=%s' %
> (self.g_tuple[0], type(self.g_tuple[0]))
>
>
> def test_generator():
> yield 'the first yield in func_async1'
>
>
> pyjd.setup('public/GUI.html')
> gui = GUI()
> gui.onModuleLoad()
> pyjd.run()
>
>
> result:
> g=function () {}, type(g)=class pyjslib.FunctionType
> self.g=class g, type(self.g)=class test_generator.GUI
>
> self.g_tuple[0]=function () {}, type(self.g_tuple[0])=class
> pyjslib.FunctionType
>
>
>
> As you can see, direct reference(g) and tuple element(g_tuple[0]) are
> equal, but the object member reference (self.g) is different. They are
> all the same in Pyjd. They are different only in Pyjs.
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Pyjs.org Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pyjs-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


Clavier

unread,
Nov 22, 2013, 11:05:17 AM11/22/13
to pyjs-...@googlegroups.com
I am deleting this post after reporting to the bug issue in github

Clavier

unread,
Nov 22, 2013, 11:08:42 AM11/22/13
to pyjs-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages