コード例 #1
0
ファイル: StructType.cs プロジェクト: wangpei421/ironpython2
            internal static IList <object> GetAnonymousFields(PythonType type)
            {
                object         anonymous;
                IList <object> anonFields = null;

                if (type.TryGetBoundAttr(type.Context.SharedContext, type, "_anonymous_", out anonymous))
                {
                    anonFields = anonymous as IList <object>;
                    if (anonFields == null)
                    {
                        throw PythonOps.TypeError("_anonymous_ must be a sequence");
                    }
                }
                return(anonFields);
            }