Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Src/IronPython/Runtime/Operations/InstanceOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@ namespace IronPython.Runtime.Operations {
/// InstanceOps contains methods that get added to CLS types depending on what
/// methods and constructors they define. These have not been added directly to
/// PythonType since they need to be added conditionally.
///
///
/// Possibilities include:
///
///
/// __new__, one of 3 __new__ sets can be added:
/// DefaultNew - This is the __new__ used for a PythonType (list, dict, object, etc...) that
/// has only 1 default public constructor that takes no parameters. These types are
/// has only 1 default public constructor that takes no parameters. These types are
/// mutable types, and __new__ returns a new instance of the type, and __init__ can be used
/// to re-initialize the types. This __new__ allows an unlimited number of arguments to
/// be passed if a non-default __init__ is also defined.
///
/// NonDefaultNew - This is used when a type has more than one constructor, or only has one
/// that takes more than zero parameters. This __new__ does not allow an arbitrary # of
/// extra arguments.
///
///
/// DefaultNewCls - This is the default new used for CLS types that have only a single ctor
/// w/ an arbitray number of arguments. This constructor allows setting of properties
/// w/ an arbitrary number of arguments. This constructor allows setting of properties
/// based upon an extra set of kw-args, e.g.: System.Windows.Forms.Button(Text='abc'). It
/// is only used on non-Python types.
///
///
/// __init__:
/// For types that do not define __init__ we have an __init__ function that takes an
/// unlimited number of arguments and does nothing. All types share the same reference
/// to 1 instance of this.
///
///
/// next: Defined when a type is an enumerator to expose the Python iter protocol.
///
///
///
///
/// repr: Added for types that override ToString
///
///
/// get: added for types that implement IDescriptor
/// </summary>
public static class InstanceOps {
Expand All @@ -75,7 +75,7 @@ internal static BuiltinMethodDescriptor Init {
return _Init;
}
}


internal static BuiltinFunction New {
get {
Expand Down Expand Up @@ -129,7 +129,7 @@ public static object OverloadedNewBasic(CodeContext context, SiteLocalStorage<Ca

public static object OverloadedNewKW(CodeContext context, BuiltinFunction overloads\u00F8, PythonType type\u00F8, [ParamDictionary]IDictionary<object, object> kwargs\u00F8) {
if (type\u00F8 == null) throw PythonOps.TypeError("__new__ expected type object, got {0}", PythonOps.Repr(context, DynamicHelpers.GetPythonType(type\u00F8)));

return overloads\u00F8.Call(context, null, null, ArrayUtils.EmptyObjects, kwargs\u00F8);
}

Expand Down Expand Up @@ -213,7 +213,7 @@ public static object NextMethod(object self) {
/// </summary>
public static PythonList DynamicDir(CodeContext/*!*/ context, IDynamicMetaObjectProvider self) {
PythonList res = new PythonList(self.GetMetaObject(Expression.Parameter(typeof(object))).GetDynamicMemberNames());

// add in the non-dynamic members from the dynamic objects base class.
Type t = self.GetType();
while (typeof(IDynamicMetaObjectProvider).IsAssignableFrom(t)) {
Expand Down Expand Up @@ -553,7 +553,7 @@ public static bool ComparableLessEqual<T>(T x, [NotNull]T y)
where T : IComparable {
return x.CompareTo(y) <= 0;
}

[return: MaybeNotImplemented]
public static object ComparableEquality<T>([NotNull]T x, object y)
where T : IComparable {
Expand Down Expand Up @@ -653,7 +653,7 @@ public static object ComparableLessEqual<T>(object y, [NotNull]T x)
// operator direction is reversed
return ScriptingRuntimeHelpers.BooleanToObject(x.CompareTo(y) >= 0);
}

#endregion

/// <summary>
Expand All @@ -672,7 +672,7 @@ public static void ExitMethod(IDisposable/*!*/ self, object exc_type, object exc

[PropertyMethod, StaticExtensionMethod]
public static PythonList/*!*/ Get__all__<T>(CodeContext/*!*/ context) {
Debug.Assert(typeof(T).IsSealed && typeof(T).IsAbstract, "__all__ should only be produced for static members");
Debug.Assert(typeof(T).IsSealed && typeof(T).IsAbstract, "__all__ should only be produced for static members");

PythonType pt = DynamicHelpers.GetPythonTypeFromType(typeof(T));

Expand Down Expand Up @@ -801,7 +801,7 @@ out deserializeNew
Debug.Assert(res);

return PythonTuple.MakeTuple(
deserializeNew, // function to call, clr.DeserializeNew
deserializeNew, // function to call, clr.DeserializeNew
data, // data to pass to it - our type & the raw data from the .NET serializer
null // state, unused
);
Expand Down
3 changes: 0 additions & 3 deletions Src/IronPythonTest/Cases/IronPythonCasesManifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ NotParallelSafe=true # Creates/deletes temporary modules and directories with fi
[IronPython.test_importpkg]
Ignore=true

[IronPython.test_inheritance]
Ignore=true

[IronPython.test_interactive]
Ignore=true
Reason=Requires powershell
Expand Down
Loading