[Orbit-python-list] Spec non-compliance re structures
Status: Inactive
Brought to you by:
tack
From: Chip R. <ch...@ni...> - 2001-10-29 10:38:07
|
I had discovered this a couple of days ago, but didn't realize that spec compliance was of current interest. This is similar to the issue I found with unions; from section 1.3.4 of the mapping spec, I made this IDL: module Struck { interface StruckIF { struct segment { long left_limit; long right_limit; }; }; }; And with it, this code: #! /usr/bin/env python import CORBA from Struck import StruckIF s = StruckIF.segment (-3, 7) print s.left_limit, s.right_limit When run, that combination gives this error: Traceback (innermost last): File "./struck-client", line 7, in ? print s.left_limit, s.right_limit AttributeError: left_limit The form of the constructor I've been using that does seem to work is this: s = StruckIF.segment (left_limit=-3, right_limit=7) Now, I'm a big fan of keyword parameters, but there are times when I'd be just as happy using positionals. I hope this helps. -- Chip |