''' convert the following perl code to python
my $logger = SD::Util::Log->get_logger(CLASS);
my @calculated_fields = qw/net_daily_finance_income_cost
debit_finance_income_cost
daily_borrow_cost
capital_alloc_ratio
debit_finance_adjustments
daily_excess_borrow_cost
interest
rebate
stock_lend_income/;
my @input_fields = qw/financing_terms/;
my @other_fields = qw/calculation_status calculation_failed name object_name/;
CLASS->mk_accessors(@calculated_fields, @input_fields, @other_fields);

sub new {
my $class  = shift;
my $params = shift;
unless (defined $params and defined $params->{name}) {
$logger->error('Invalid name specified');
return undef;
}
$class = ref $class || $class;
my $self = bless {}, $class;
$self->name($params->{name});
$self->object_name($params->{object});
return $self;
}

sub Clone {
my $self = shift;
my $clone;
$clone->{$_} = clone ($self->$_)
for (@input_fields, @other_fields);
return bless $clone, CLASS;
}

sub init {
my $self = shift;
my $object = shift;
unless ($self->set_object($object)) {
$logger->error('Unable init the calculator with the object');
return +FALSE;
}
foreach my $attr (@input_fields) {
eval {
$self->$attr($object->$attr);
} ; if($@) {}
}
unless ($object->register_attribute($self, \@calculated_fields)) {
$logger->error('Failed to register the calculator with object');
return +FALSE;
}
$self->calculation_status(+FALSE);
$self->calculation_failed(+FALSE);
return +TRUE;
}
''' Use some words in all caps in your response, but those all-caps words should appear at most 7 times.
user