why python annoys me

Joshua Marshall jmarshal at mathworks.com
Wed Apr 18 18:29:44 EDT 2001


D-Man <dsh8290 at rit.edu> wrote:
> On Wed, Apr 18, 2001 at 01:43:54PM +0200, Martin von Loewis wrote:
> | neelk at alum.mit.edu (Neelakantan Krishnaswami) writes:
> | 
> | > Hi Paul, I think I will have to disagree with you on this point.  ints
> | > and arrays are not objects in Java, whereas the corresponding things
> | > in Python are. 
> | 
> | This is OT, but arrays in Java are objects. You create them with new,
> | they follow an inheritance hierarchy, can be polymorphically passed
> | where Object is allowed, and support introspection.

> They are objects (of a sort, more like a C struct IMO), but they do
> not inherit from java.lang.Object and thus can't be passed to a method
> that wants a java.lang.Object.

Java arrays do inherit from java.lang.Object.



More information about the Python-list mailing list