Newbie question about Python syntax

Kyle Stanley aeros167 at gmail.com
Thu Aug 22 17:21:25 EDT 2019


> You are right, but it is even worse than you think. I do not have a
tutorial so I have no examples to understand.

The tutorial that Terry was referring to was the one on docs.python.org,
here's a couple of links for the sections he was referring to:

Full section on classes: https://docs.python.org/3/tutorial/classes.html

Section on instantiating objects from classes:
https://docs.python.org/3/tutorial/classes.html#class-objects

On Thu, Aug 22, 2019 at 4:40 PM Paul St George <email at paulstgeorge.com>
wrote:

> On 22/08/2019 20:02, Terry Reedy wrote:
> > On 8/22/2019 3:34 AM, Paul St George wrote:
> >> I have the Python API for the Map Value Node here:
> >> <
> https://docs.blender.org/api/current/bpy.types.CompositorNodeMapValue.html>.
>
> >>
> >>
> >> All well and good. Now I just want to write a simple line of code such
> >> as:
> >>
> >> import bpy
> >>
> >> ...
> >>
> >>  >>>print(bpy.types.CompositorNodeMapValue.max[0])
> >>
> >> If this works, I will do something similar for max, min, offset and
> >> then size.
> >
> >  From this and your other responses, you seem to not understand some of
> > the concepts explained in the tutorial, in particular class and class
> > instance.  Perhaps you should reread the appropriate section(s), and if
> > you don't understand any of the examples, ask about them here.  We are
> > familiar with those, but not with CompositorNodeMapValue.
> >
> >
> Terry,
> You are right, but it is even worse than you think. I do not have a
> tutorial so I have no examples to understand.
>
> Reading Cameron et al, I have broken the problem down into:
> do something (probably using the word self) that _gives_ me an instance
> of CompositorNodeMapValue.
>
> Then when I done that,
> look at some of the attributes (.max, .min, .offset, .size) of the
> instance.
>
> Paul
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list