Message-ID: <274942165.40938.1371633512700.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_40937_827750821.1371633512700" ------=_Part_40937_827750821.1371633512700 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Just a note that we could use some docs on:
The &qu= ot;=3D=3D" operation is deceptively simple. When a data structuer has = overriden the "Equals" method, .NET/Boo checks the values of one = data structure against another and returns true if they are identical or fa= lse if they are not. By default, .NET provides "Equals" overloads= for most of the builtin data-types like int, float, decimal, string, and e= tc. Using "=3D=3D", two seperate objects can be evaluated and it = can be determined if, by value, they are equal or not.
The "isa&= quot; keyword determines if a variable is of a particular type. "isa&q= uot; is useful in determining if a variable implements an interface, or der= ives from a common base class.
The "is" keyword serves a di=
fferent, and somewhat more complex function. Sometimes you might want to go=
beyond the usual check of "are these two variables of equal v=
alue?" and see, "are these two variables actually
This technique is normally used when yo= u receive an object by poking a dictionary or invoking a method; if the ide= ntity of var1 and var2 is the same, then they are obviously equal--because = they are the same object.
/* Prints out... True, True, False! */ class Food: =09pass class Sandwich(Food): =09pass hamAndSwiss =3D Sandwich() print hamAndSwiss isa Food print hamAndSwiss isa Sandwich print hamAndSwiss isa int=09=09