Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76071 > unrolled thread

Python Object Systems

Started bythequietcenter@gmail.com
First post2014-08-11 13:26 -0700
Last post2014-08-14 03:34 -0700
Articles 11 — 6 participants

Back to article view | Back to comp.lang.python


Contents

  Python Object Systems thequietcenter@gmail.com - 2014-08-11 13:26 -0700
    Re: Python Object Systems Skip Montanaro <skip@pobox.com> - 2014-08-11 15:37 -0500
      Re: Python Object Systems thequietcenter@gmail.com - 2014-08-11 14:02 -0700
      Re: Python Object Systems Marko Rauhamaa <marko@pacujo.net> - 2014-08-12 00:09 +0300
        Re: Python Object Systems thequietcenter@gmail.com - 2014-08-11 14:26 -0700
          Re: Python Object Systems Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-11 22:51 +0100
          Re: Python Object Systems Marko Rauhamaa <marko@pacujo.net> - 2014-08-12 00:51 +0300
    Re: Python Object Systems "Mike C. Fletcher" <mcfletch@vrplumber.com> - 2014-08-11 18:56 -0400
    Re: Python Object Systems Michele Simionato <michele.simionato@gmail.com> - 2014-08-13 01:32 -0700
      Re: Python Object Systems thequietcenter@gmail.com - 2014-08-13 10:13 -0700
        Re: Python Object Systems Michele Simionato <michele.simionato@gmail.com> - 2014-08-14 03:34 -0700

#76071 — Python Object Systems

Fromthequietcenter@gmail.com
Date2014-08-11 13:26 -0700
SubjectPython Object Systems
Message-ID<2d41828e-19ac-4e46-a487-8700c22d9b92@googlegroups.com>
(Cross-posted from http://www.reddit.com/r/Python/comments/2d9f7i/survey_of_python_object_systems/)

Hello, has anyone created a survey of Python Object Systems? The two I am aware of are:

- elk https://github.com/frasertweedale/elk
- Traits http://code.enthought.com/projects/traits/

[toc] | [next] | [standalone]


#76072

FromSkip Montanaro <skip@pobox.com>
Date2014-08-11 15:37 -0500
Message-ID<mailman.12864.1407789458.18130.python-list@python.org>
In reply to#76071
On Mon, Aug 11, 2014 at 3:26 PM,  <thequietcenter@gmail.com> wrote:
> has anyone created a survey of Python Object Systems?

For the uninitiated, can you back up a step and define what you mean
by an "object system"? The term seems kind of broad for Google (
number of hits for CLOS, etc), and Wikipedia just directs to a page on
object-oriented programming.

Thx,

Skip

[toc] | [prev] | [next] | [standalone]


#76073

Fromthequietcenter@gmail.com
Date2014-08-11 14:02 -0700
Message-ID<66c2838c-0658-4fcf-a27f-bb80a9c141e3@googlegroups.com>
In reply to#76072
On Monday, August 11, 2014 4:37:29 PM UTC-4, Skip Montanaro wrote:
> On Mon, Aug 11, 2014 at 3:26 PM,  <thequietcenter@gmail.com> wrote:
> 
> > has anyone created a survey of Python Object Systems?
> 
> 
> 
> For the uninitiated, can you back up a step and define what you mean
> 
> by an "object system"? 

I mean a system by which one creates and manages Python objects. For instance, Python ships with an object system as documented here:
https://docs.python.org/2/tutorial/classes.html

However, some developers have found the need to add features to the standard Python object system (e.g. delegation, typing, etc), thus offering a new object system.

So far, the following object systems have been found:

* elk https://github.com/frasertweedale/elk
* Traits http://code.enthought.com/projects/traits/
* yuppy https://github.com/kuujo/yuppy

-- Terrence

[toc] | [prev] | [next] | [standalone]


#76074

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-08-12 00:09 +0300
Message-ID<871tsmg2cw.fsf@elektro.pacujo.net>
In reply to#76072
Skip Montanaro <skip@pobox.com>:

> On Mon, Aug 11, 2014 at 3:26 PM,  <thequietcenter@gmail.com> wrote:
>> has anyone created a survey of Python Object Systems?
>
> For the uninitiated, can you back up a step and define what you mean
> by an "object system"?

Elk and Traits implement a C++-style object model on top of Python. The
systems enforce member access, type constraints etc and result in ugly
code that barely looks like Python.


Marko

[toc] | [prev] | [next] | [standalone]


#76075

Fromthequietcenter@gmail.com
Date2014-08-11 14:26 -0700
Message-ID<1b08b207-1eef-4da2-9b81-ca997079d293@googlegroups.com>
In reply to#76074
On Monday, August 11, 2014 5:09:35 PM UTC-4, Marko Rauhamaa wrote:

> 
> Elk and Traits implement a C++-style object model on top of Python. The
> 
> systems enforce member access, type constraints etc and result in ugly
> 
> code that barely looks like Python.

I personally get tired of manually assigning attributes in a __init__() method. So at the bare minimum something like Atom will do if nothing else:

https://github.com/nucleic/atom

And I imagine yuppy would make you upchuck as well:
https://github.com/kuujo/yuppy

[toc] | [prev] | [next] | [standalone]


#76077

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-08-11 22:51 +0100
Message-ID<mailman.12866.1407793886.18130.python-list@python.org>
In reply to#76075
On 11/08/2014 22:26, thequietcenter@gmail.com wrote:
> On Monday, August 11, 2014 5:09:35 PM UTC-4, Marko Rauhamaa wrote:
>
>>
>> Elk and Traits implement a C++-style object model on top of Python. The
>>
>> systems enforce member access, type constraints etc and result in ugly
>>
>> code that barely looks like Python.
>
> I personally get tired of manually assigning attributes in a __init__() method. So at the bare minimum something like Atom will do if nothing else:
>
> https://github.com/nucleic/atom
>
> And I imagine yuppy would make you upchuck as well:
> https://github.com/kuujo/yuppy
>

Would you please read and action this 
https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the 
double line spacing and single line paragraphs above, thanks.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#76078

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-08-12 00:51 +0300
Message-ID<87sil2elve.fsf@elektro.pacujo.net>
In reply to#76075
thequietcenter@gmail.com:

> I personally get tired of manually assigning attributes in a
> __init__() method.

It's not all that bad. Just do it.


Marko

[toc] | [prev] | [next] | [standalone]


#76086

From"Mike C. Fletcher" <mcfletch@vrplumber.com>
Date2014-08-11 18:56 -0400
Message-ID<mailman.12871.1407798306.18130.python-list@python.org>
In reply to#76071
On 14-08-11 04:26 PM, thequietcenter@gmail.com wrote:
...
> Hello, has anyone created a survey of Python Object Systems? The two I am aware of are:
>
> - elk https://github.com/frasertweedale/elk
> - Traits http://code.enthought.com/projects/traits/
Here's the ones from my talk at Pycon 2005 
(http://www.vrplumber.com/programming/descriptors-pycon2005.pdf):

OpenGLContext/PyVRML97
     http://bazaar.launchpad.net/~mcfletch/pyvrml97/trunk/files
     Observable, auto-coercing data properties w/ Numeric/numpy array 
support, defaults
BasicProperty (now largely abandoned):
     http://bazaar.launchpad.net/~mcfletch/basicproperty/trunk/files
     Again, observable auto-coercing typed properties, defaults, 
introspection
Zope2
     FieldProperty, DublinCore, Validation, Observability
PEAK
     Defaults, delegation, implicit feature loading
Traits
     Delegation, typing, validation, defaults, Observability, introspection
PyObjc, ctypes, JythonC, IronPython
     Function-like things with lots of metadata

There's also a listing of the other tasks for which descriptors/object 
systems were expected to show up at the time, if you look for Python + 
that key-word you'll likely find a few dozen more "object systems" out 
there.  You'll also likely find about a thousand metaclasses these days.

HTH,
Mike

-- 
________________________________________________
   Mike C. Fletcher
   Designer, VR Plumber, Coder
   http://www.vrplumber.com
   http://blog.vrplumber.com

[toc] | [prev] | [next] | [standalone]


#76174

FromMichele Simionato <michele.simionato@gmail.com>
Date2014-08-13 01:32 -0700
Message-ID<e634497f-9995-48ba-9288-ad2f8ec86ac4@googlegroups.com>
In reply to#76071
Years ago I wrote strait: https://pypi.python.org/pypi/strait
I wonder who is using it and for what purpose, since surprisingly enough it has 50+ downloads per day. For me it was more of an experiment than a real project.

[toc] | [prev] | [next] | [standalone]


#76218

Fromthequietcenter@gmail.com
Date2014-08-13 10:13 -0700
Message-ID<0299640d-310c-41c6-a308-5552c202e0a8@googlegroups.com>
In reply to#76174
On Wednesday, August 13, 2014 4:32:04 AM UTC-4, Michele Simionato wrote:
> Years ago I wrote strait: https://pypi.python.org/pypi/strait

What is the difference between traits and roles?

[toc] | [prev] | [next] | [standalone]


#76293

FromMichele Simionato <michele.simionato@gmail.com>
Date2014-08-14 03:34 -0700
Message-ID<490a3fc3-3090-47f8-9800-ef249d2e73d7@googlegroups.com>
In reply to#76218
Il giorno mercoledì 13 agosto 2014 19:13:16 UTC+2, thequie...@gmail.com ha scritto:
> What is the difference between traits and roles?

People keep using the same names to mean different concepts. For me traits are the things described here:

http://www.iam.unibe.ch/~scg/Archive/Papers/Scha03aTraits.pdf

I have no idea of what you mean by roles.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web