 //===----------------------------------------------------------------------===//
 
 import Python
+import Foundation
 
 //===----------------------------------------------------------------------===//
 // MARK: PyRef Implementation

    
    /// An access to an invalid tuple member was performed.
    case invalidTupleMember(base: PyVal)
}

extension PythonError : CustomStringConvertible {
    public var description: String {
        switch self {
        case .exception(let p): return "exception: \(p)"
        case .invalidCall(let p): return "invalidCall: \(p)"
        case .invalidMember(let m): return "invalidMember: \(m)"
        case .invalidTupleMember(let p): return "invalidTupleMember: \(p)"
        }
    }
}


/// This represents the result of a failable operation when working with
/// python values.
public enum PythonError : LocalizedError {
    /// This represents an exception thrown out of a Python API.  This can occur
    /// on calls.
    case exception(_: PyVal)
