[TriPython] Nested Properties

David Handy david at handysoftware.com
Mon Sep 28 21:48:32 EDT 2020


The "inner" class definitions didn't have to be nested classes. They 
could be even classes imported from other modules if lots of other code 
is involved.

Other than that I don't see a simpler way to do that.

On 9/28/20 5:13 PM, Calloway, Chris wrote:
>     A colleague asked me today about nested properties. I said I'd never seen
>     such a thing. So, refusing the temptation to guess, I tried it. It's not
>     pretty. It requires nested inner classes. I'm sure if you feel led to do
>     something like this, there must be a better way. But it is possible:
>
>      
>
>     https://gist.github.com/cbcunc/4c797c88e96d9a2bd32d77dda3e18e21
>
>      
>
>     --
>
>     Sincerely,
>
>      
>
>     Chris Calloway
>
>     Applications Analyst
>
>     University of North Carolina
>
>     Renaissance Computing Institute
>
>     (919) 599-3530
>
>      
>
>
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> https://mail.python.org/mailman/listinfo/trizpug
> http://tripython.org is the Triangle Python Users Group
-------------- next part --------------
   The "inner" class definitions didn't have to be nested classes. They could
   be even classes imported from other modules if lots of other code is
   involved.

   Other than that I don't see a simpler way to do that.

   On 9/28/20 5:13 PM, Calloway, Chris wrote:

    A colleague asked me today about nested properties. I said I'd never seen
    such a thing. So, refusing the temptation to guess, I tried it. It's not
    pretty. It requires nested inner classes. I'm sure if you feel led to do
    something like this, there must be a better way. But it is possible:

     

    [1]https://gist.github.com/cbcunc/4c797c88e96d9a2bd32d77dda3e18e21

     

    -- 

    Sincerely,

     

    Chris Calloway

    Applications Analyst

    University of North Carolina

    Renaissance Computing Institute

    (919) 599-3530

     


 _______________________________________________
 TriZPUG mailing list
 [2]TriZPUG at python.org
 [3]https://mail.python.org/mailman/listinfo/trizpug
 [4]http://tripython.org is the Triangle Python Users Group

References

   Visible links
   1. https://gist.github.com/cbcunc/4c797c88e96d9a2bd32d77dda3e18e21
   2. mailto:TriZPUG at python.org
   3. https://mail.python.org/mailman/listinfo/trizpug
   4. http://tripython.org/


More information about the TriZPUG mailing list