<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.12-alpha" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Ruby, Rails, C and Web Services</title>
	<link>http://oscar.hellstrom.st/blog/2006/03/ruby-rails-c-and-web-services</link>
	<description>Private pages of yet another developer.</description>
	<pubDate>Mon, 21 May 2012 01:55:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.12-alpha</generator>

	<item>
		<title>by: oscarh</title>
		<link>http://oscar.hellstrom.st/blog/2006/03/ruby-rails-c-and-web-services#comment-239</link>
		<pubDate>Tue, 30 May 2006 20:06:04 +0000</pubDate>
		<guid>http://oscar.hellstrom.st/blog/2006/03/ruby-rails-c-and-web-services#comment-239</guid>
					<description>Yeah, well, i know, they say that everything is an object.
It just does not feel all that object oriented with lots of functions such as isinstance(1,object) instead of i.e. 1.isinstanceof(object)

I guess you also would do:
foo = 1
isinstance(foo,object)
and not 
foo = 1
foo.isinstance(object)

On the other hand, I haven't used Python enough to really be in any position to criticise the language or it's constructs.</description>
		<content:encoded><![CDATA[<p>Yeah, well, i know, they say that everything is an object.<br />
It just does not feel all that object oriented with lots of functions such as isinstance(1,object) instead of i.e. 1.isinstanceof(object)</p>
<p>I guess you also would do:<br />
foo = 1<br />
isinstance(foo,object)<br />
and not<br />
foo = 1<br />
foo.isinstance(object)</p>
<p>On the other hand, I haven&#8217;t used Python enough to really be in any position to criticise the language or it&#8217;s constructs.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Nicolas Lehuen</title>
		<link>http://oscar.hellstrom.st/blog/2006/03/ruby-rails-c-and-web-services#comment-238</link>
		<pubDate>Tue, 30 May 2006 19:44:55 +0000</pubDate>
		<guid>http://oscar.hellstrom.st/blog/2006/03/ruby-rails-c-and-web-services#comment-238</guid>
					<description>For the record, in Python, everything is an object, too.

&#62;&#62;&#62; type(1)

&#62;&#62;&#62; issubclass(int,object)
True
&#62;&#62;&#62; isinstance(1,object)
True
&#62;&#62;&#62; dir(1)
['__abs__', '__add__', '__and__', '__class__', '__cmp__', '__coerce__', '__delattr__', '__div__', '__divmod__', '__doc__', '__float__', '__floordiv__', '__getattribute__', '__getnewargs__', '__hash__', '__hex__', '__init__', '__int__', '__invert__', '__long__', '__lshift__', '__mod__', '__mul__', '__neg__', '__new__', '__nonzero__', '__oct__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdiv__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__str__', '__sub__', '__truediv__', '__xor__']
&#62;&#62;&#62; class myint(int):
...     def __add__(self,other):
...             return int.__add__(self,other)+1
...
&#62;&#62;&#62; a = myint(5)
&#62;&#62;&#62; a + 1
7
&#62;&#62;&#62; b = myint(5)
&#62;&#62;&#62; a + b
11
&#62;&#62;&#62; str(abs(-a))
'5'

Back in 1991 Python was not object oriented, and every thing was not an object, but hey, it was in 1991. Python has since evolved and has a fully object oriented structure since 2002 and the Python 2.2 release (of course, object orientation was there before but there was a difference between 'types' and 'classes').</description>
		<content:encoded><![CDATA[<p>For the record, in Python, everything is an object, too.</p>
<p>&gt;&gt;&gt; type(1)</p>
<p>&gt;&gt;&gt; issubclass(int,object)<br />
True<br />
&gt;&gt;&gt; isinstance(1,object)<br />
True<br />
&gt;&gt;&gt; dir(1)<br />
[&#8217;__abs__&#8217;, &#8216;__add__&#8217;, &#8216;__and__&#8217;, &#8216;__class__&#8217;, &#8216;__cmp__&#8217;, &#8216;__coerce__&#8217;, &#8216;__delattr__&#8217;, &#8216;__div__&#8217;, &#8216;__divmod__&#8217;, &#8216;__doc__&#8217;, &#8216;__float__&#8217;, &#8216;__floordiv__&#8217;, &#8216;__getattribute__&#8217;, &#8216;__getnewargs__&#8217;, &#8216;__hash__&#8217;, &#8216;__hex__&#8217;, &#8216;__init__&#8217;, &#8216;__int__&#8217;, &#8216;__invert__&#8217;, &#8216;__long__&#8217;, &#8216;__lshift__&#8217;, &#8216;__mod__&#8217;, &#8216;__mul__&#8217;, &#8216;__neg__&#8217;, &#8216;__new__&#8217;, &#8216;__nonzero__&#8217;, &#8216;__oct__&#8217;, &#8216;__or__&#8217;, &#8216;__pos__&#8217;, &#8216;__pow__&#8217;, &#8216;__radd__&#8217;, &#8216;__rand__&#8217;, &#8216;__rdiv__&#8217;, &#8216;__rdivmod__&#8217;, &#8216;__reduce__&#8217;, &#8216;__reduce_ex__&#8217;, &#8216;__repr__&#8217;, &#8216;__rfloordiv__&#8217;, &#8216;__rlshift__&#8217;, &#8216;__rmod__&#8217;, &#8216;__rmul__&#8217;, &#8216;__ror__&#8217;, &#8216;__rpow__&#8217;, &#8216;__rrshift__&#8217;, &#8216;__rshift__&#8217;, &#8216;__rsub__&#8217;, &#8216;__rtruediv__&#8217;, &#8216;__rxor__&#8217;, &#8216;__setattr__&#8217;, &#8216;__str__&#8217;, &#8216;__sub__&#8217;, &#8216;__truediv__&#8217;, &#8216;__xor__&#8217;]<br />
&gt;&gt;&gt; class myint(int):<br />
&#8230;     def __add__(self,other):<br />
&#8230;             return int.__add__(self,other)+1<br />
&#8230;<br />
&gt;&gt;&gt; a = myint(5)<br />
&gt;&gt;&gt; a + 1<br />
7<br />
&gt;&gt;&gt; b = myint(5)<br />
&gt;&gt;&gt; a + b<br />
11<br />
&gt;&gt;&gt; str(abs(-a))<br />
&#8216;5&#8242;</p>
<p>Back in 1991 Python was not object oriented, and every thing was not an object, but hey, it was in 1991. Python has since evolved and has a fully object oriented structure since 2002 and the Python 2.2 release (of course, object orientation was there before but there was a difference between &#8216;types&#8217; and &#8216;classes&#8217;).
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

