Python/C++ vs. Perl/C++

Inheritance

Here's a little exercise that should demonstrate that Python is a more natural scripting language option than Perl, especially for C++ programmers. This is but one of many possible examples.

The task: Show prototype info for a class Female that inherits from a class Person.

Comment on this topic

C++
class Female : public Person
...
Perl
use Person;
package Person::Female;
BEGIN{@ISA = qw (Person);}
...

OR, I have also seen something like

use Person;
package Person::Female;
use vars qw(@ISA);
@ISA = qw(Person);
...

Bizarre.

Python
class Female(Person):
...