Hi,
will all the functions of a python class be mirror all functions in a C++ class? when i try to use the Schedule class in python, it claims it doesnt have those attributes documented here http://quantlib.org/reference/class_quant_lib_1_1_schedule.html I am trying something like this schedule = QuantLib.Schedule(settlementDate, maturity, QuantLib.Period(5, QuantLib.Years), China(), QuantLib.Unadjusted, QuantLib.Unadjusted, QuantLib.DateGeneration.Forward, False) print schedule.dates() -- 王硕 邮箱:[hidden email] Whatever your journey, keep walking. ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Ciosco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Thu, 2011-10-20 at 15:43 +0800, Shuo Wang wrote:
> will all the functions of a python class be mirror all functions in a > C++ class? That would be the idea, but it needs work. > when i try to use the Schedule class in python, it claims it doesnt > have those attributes documented here > > http://quantlib.org/reference/class_quant_lib_1_1_schedule.html > > I am trying something like this > > schedule = QuantLib.Schedule(settlementDate, maturity, > QuantLib.Period(5, > QuantLib.Years), China(), > QuantLib.Unadjusted, > QuantLib.Unadjusted, > QuantLib.DateGeneration.Forward, False) > print schedule.dates() Hmm. Yes, that's missing. You can add it to the SWIG interface and regenerate the wrappers (send me a patch if you do and I'll add it to next release) or, in this case, you can work around it by using print list(schedule) or for d in schedule: print d Luigi -- Everything can be filed under "miscellaneous". -- unknown ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Ciosco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |