Мой Python код имеет следующий классPython - Позиция Аргумент отсутствует
class payment_calculations:
def __init__(self):
self.__interestdatecurrent = str()
return None
def paymentfixed(self, notional, datecouponstart, datecouponend, interestratecurrent, interestratefixed, datecurrent):
Когда я называю его
fixedpayment = payment_calculations.paymentfixed(interestnotional, datecoupon1, datecoupon2, c, interestratefixed, interestdatecurrent)
вижу следующее трассировки стека
File "C:\Python34\mod_payment_calculation.py", line 83, in coupondatesfixed
fixedpayment = payment_calculations.paymentfixed(interestnotional,datecoupon1,datecoupon2,c,interestratefixed,interestdatecurrent)
TypeError: paymentfixed() missing 1 required positional argument: 'datecurrent'
Я подтверждал это работает при вызове из тестового файла. Однако, когда я бегу изнутри модуля, он терпит неудачу. Есть идеи?
Doh! - Я создал этот модуль и класс и т. Д. Из другого файла. – user3503078
Теперь разрешено. благодаря – user3503078