Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > New to Python: Features

Reply
Thread Tools

New to Python: Features

 
 
Richard Blackwood
Guest
Posts: n/a
 
      10-05-2004
Hi, I'm new to Python and I'd like to know if Python has the following
support: *please answer to each individually, thanks*

1. Multi line comments
2. Functions as variables:
a. functions can be stored in variables, passed as arguments to
other functions, and returned as results.
3. Function nesting with proper lexical scope (i.e. closures)
4. Operator overloading (inc. the ability to define new operators)
5. Can I do this? print("Hello " .. "World") --> Hello World
6. Constructors
7. "Chunks": as in a code block contained within a string, file, or
delimited by some sort of notation (such as brackets) which can be
passed to and from functions, stored in objects, with the option of
local scoping of variables declared within it.
8. "Repeat-Until" as in :
repeat
line = os.read()
until line ~= ""
print(line)
9. Generic for loops where " for i=1,f(x) do print(i) end" would print i
only once.
10. Can I call an object's method as object:method(arg) and have that
translate into object.method(object, arg)
11. Can I make dynamic statements and nature like with eval() in Javascript?
12. Can I make calls to a function with a varying number of arguments?
13. Named arguments
14. Tables with built-in methods for manipulation such as sort, etc.
15. Table filters
15. Proper Tail Call (otherwise known as Proper Tail Recursion)
16. The ability to call a function without brackets
17. Is the Python interpreter a JIT? Does it have a bytecode? Is it as
fast as Java?
18. The ability to modify the import/require functionality (how modules
can be loaded)
19. Coroutines and threads (non-preemptive)
20. Date persistence and serialization
21. May modules be stored in variables, passed to and produced from
functions, and so forth?
22. Is the self parameter hidden from me as a programmer? Can I
hide/unhide it as I wish?
23. Prototype-based OOP or the ability to extend a class without
physically modifying it
24. Manual garbage management
25. A fully implemented .NET counterpart (I should be able to write
Python scripts for both with the same code)
26. How easily can other languages access it and vice versa?
27. The option of mixing in static typing
28. Automatic type coercion
29. Is Python designed in such a way that I may merely "plugin" a
C/C++/Java/D module which will then allow for mixing their syntax and
perhaps even access to their facilities within Python?
30. Messaging syntax such as : [myColor setRed:0.0 green:0.5 blue:1.0]
or [dog bringaper to:me] and [[myAunt phone] setTo:[myUncle phone]]
<--- Nested messages and [dog perform:sel_get_uid("bark")] which is the
same as [dog bark]
31. Concepts of Protocols (whereby one may organize related methods into
groups and check whether a particular object implements the methods
within this protocol), or Interfaces similar to those in Java whereby
classes or objects which implement the interface (sign the contract)
must implement the methods and attributes as specified in the interface,
and/or programming by contract such as in Eiffel (see:
http://www.devhood.com/tutorials/tut...utorial_id=595)
32. Support for unplanned reuse of classes such as in TOM
(http://www.gerbil.org/tom/)
33. Function/Method overloading
34. In pure Python, can I change and add new constructs to the Python
syntax?
35. May I modify the garbage collector?
36. May I implement control structures as object messages?
37. Dynamic dispatch
38. Reflection and/or templates
39. Unicode
40. Ability to call external APIs and DLLs with relative ease
41. How easy is it to port my Python code to C/C++/C# or Java?
42. The ability to assign a method(s) to a collection/group of objects
[with a particular signature i.e.]
43. Embedding variables in strings like: print "Hello, World. Time:
#{Time.now}"
44. Case or Switch statements with functionality as such:
case score
when 0...40
puts "Horrible!"
when 40...60
puts "Poor"
when 60...80
puts "You can do better!"
when 80...95
puts "Now that's acceptable"
when 95..100
puts "That the best you can do? j/k"
else
puts "Didn't take the test?"
end
45. Are all things objects in Python? Do all objects have built-in
iterators and the like? i.e. can I do this:
3.times { print "Ho! " }
puts "Merry Christmas"

That's all folks!


 
Reply With Quote
 
 
 
 
Grant Edwards
Guest
Posts: n/a
 
      10-05-2004
On 2004-10-05, Richard Blackwood <(E-Mail Removed)> wrote:
> Hi, I'm new to Python and I'd like to know if Python has the following
> support: *please answer to each individually, thanks*


Wow. Rude much?

http://www.catb.org/~esr/faqs/smart-questions.html
http://www.python.org/

--
Grant Edwards grante Yow! .. the MYSTERIANS are
at in here with my CORDUROY
visi.com SOAP DISH!!
 
Reply With Quote
 
 
 
 
Andrew Dalke
Guest
Posts: n/a
 
      10-05-2004
Richard Blackwood wrote:
> Hi, I'm new to Python and I'd like to know if Python has the following
> support: *please answer to each individually, thanks*


Welcome to Python. I've been using it for almost a decade
and full time for 7 years and quite enjoy it.

However. You've asked a whole bunch of questions which
look as if you've not done any research on your own. It
has the feeling almost that you're asking us to do a
homework assignment for you. Given the question

> 39. Unicode


it means you haven't even looked at the tutorial at
http://docs.python.org/tut/tut.html
with its section 3.1.3 "Unicode strings".

much less given a cursory review of the reference manual at
http://docs.python.org/ref/ref.html

Given your questions about closure, tail recursion,
JIT, prototype-based OOP, etc. you are apparently not
new to programming. Reading through the base
documentation should be a much better use of your time
and ours than having people answer your questions point
by point. After all, some of your questions require
non-trivial amounts of contextualization to answer
correctly. Eg, your #30 assumes a Smalltalk paradigm,
while Python uses a different way to achieve similar
ends, your #28 requires explaining Python's reference
based semantics where variable have only one type,
reference to object, and your #11 requires a stern
warning that such behaviour is almost certainly a
security hole waiting to happen.

The most suspicious part about your post is your
haphazard use of so many different programming
paradigms combined with the almost pedigogical way
of describing some of them.

Please read the basic Python documentation before
asking these questions.

Andrew
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      10-05-2004
On 2004-10-05, Richard Blackwood <(E-Mail Removed)> wrote:
> Grant Edwards wrote:
>
>>>Hi, I'm new to Python and I'd like to know if Python has the following
>>>support: *please answer to each individually, thanks*

>>
>>Wow. Rude much?
>>
>>http://www.catb.org/~esr/faqs/smart-questions.html
>>http://www.python.org/
>>

> What does "Rude much" mean?


You've _got_ to be kidding...

--
Grant Edwards grante Yow! An Italian is COMBING
at his hair in suburban DES
visi.com MOINES!
 
Reply With Quote
 
Richard Blackwood
Guest
Posts: n/a
 
      10-05-2004
Andrew Dalke wrote:

> Richard Blackwood wrote:
>
>> Hi, I'm new to Python and I'd like to know if Python has the
>> following support: *please answer to each individually, thanks*

>
>
> Welcome to Python. I've been using it for almost a decade
> and full time for 7 years and quite enjoy it.
>
> However. You've asked a whole bunch of questions which
> look as if you've not done any research on your own. It
> has the feeling almost that you're asking us to do a
> homework assignment for you. Given the question
>
> > 39. Unicode

>
> it means you haven't even looked at the tutorial at
> http://docs.python.org/tut/tut.html
> with its section 3.1.3 "Unicode strings".
>
> much less given a cursory review of the reference manual at
> http://docs.python.org/ref/ref.html
>
> Given your questions about closure, tail recursion,
> JIT, prototype-based OOP, etc. you are apparently not
> new to programming. Reading through the base
> documentation should be a much better use of your time
> and ours than having people answer your questions point
> by point. After all, some of your questions require
> non-trivial amounts of contextualization to answer
> correctly. Eg, your #30 assumes a Smalltalk paradigm,
> while Python uses a different way to achieve similar
> ends, your #28 requires explaining Python's reference
> based semantics where variable have only one type,
> reference to object, and your #11 requires a stern
> warning that such behaviour is almost certainly a
> security hole waiting to happen.
>
> The most suspicious part about your post is your
> haphazard use of so many different programming
> paradigms combined with the almost pedigogical way
> of describing some of them.
>
> Please read the basic Python documentation before
> asking these questions.
>
> Andrew
> (E-Mail Removed)


Ouch! I didn't expect such harsh replies. Thanks anyways.
 
Reply With Quote
 
Richard Blackwood
Guest
Posts: n/a
 
      10-05-2004
Grant Edwards wrote:

>On 2004-10-05, Richard Blackwood <(E-Mail Removed)> wrote:
>
>
>>Hi, I'm new to Python and I'd like to know if Python has the following
>>support: *please answer to each individually, thanks*
>>
>>

>
>Wow. Rude much?
>
>http://www.catb.org/~esr/faqs/smart-questions.html
>http://www.python.org/
>
>
>

What does "Rude much" mean?
 
Reply With Quote
 
Andrew Dalke
Guest
Posts: n/a
 
      10-05-2004
Richard Blackwood wrote:
> Ouch! I didn't expect such harsh replies. Thanks anyways.


That wasn't harsh. I answered 4 of your questions.

39. pointer to the documentation on that topic
30. no, Python uses a different style
28. that question doesn't make sense for Python -- variables
only have one type
11. don't use eval (implying that Python has such a thing)

and spent at least as much information in responding as
you did in writing the questions in the first place.

I even explained why I found your post to be problematical
and left an opportunity for you to explain why my
conjectures were wrong.

Feel free to explain why we should put a lot of effort into
replying to your email when it seems you've made no effort
in answering the questions yourself, despite seeming to be
quite capable of doing so.

Andrew
(E-Mail Removed)
 
Reply With Quote
 
Richard Blackwood
Guest
Posts: n/a
 
      10-05-2004
Grant Edwards wrote:

>On 2004-10-05, Richard Blackwood <(E-Mail Removed)> wrote:
>
>
>>Grant Edwards wrote:
>>
>>
>>
>>>>Hi, I'm new to Python and I'd like to know if Python has the following
>>>>support: *please answer to each individually, thanks*
>>>>
>>>>
>>>Wow. Rude much?
>>>
>>>http://www.catb.org/~esr/faqs/smart-questions.html
>>>http://www.python.org/
>>>
>>>
>>>

>>What does "Rude much" mean?
>>
>>

>
>You've _got_ to be kidding...
>
>
>

I don't think that that is proper english.

Anyhow, I wasn't trying to muster up anything or annoy anyone. My
sincere apologies to all who were offended.
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      10-05-2004
On 2004-10-05, Richard Blackwood <(E-Mail Removed)> wrote:

>>>>>Hi, I'm new to Python and I'd like to know if Python has the following
>>>>>support: *please answer to each individually, thanks*
>>>>>
>>>>Wow. Rude much?
>>>>
>>>>http://www.catb.org/~esr/faqs/smart-questions.html
>>>>http://www.python.org/
>>>>
>>>What does "Rude much" mean?

>>
>>You've _got_ to be kidding...

>
> I don't think that that is proper english.


Oh. My. Gaawwwd!

Which one, the "Rude much?" crack or the "You've got to be
kidding..." crack? The latter isn't all that improper
(especially not for Usenet). The former is colloqial US
English. More specifically it's "Valley Speak" -- made popular
outside "The Valley" by movies like "Valley Girl", "Mall Rats",
"Heathers", and just about any John Hughes movie (especially
Sixteen Candles). The first two are crap, but "Heathers" is a
good movie, and I still like "Sixteen Candles".

> Anyhow, I wasn't trying to muster up anything or annoy anyone.
> My sincere apologies to all who were offended.


Apology accepted on the condition that you read
how-to-ask-smart-questions, and go browse around
www.python.org for 15 minutes.

--
Grant Edwards grante Yow! Uh-oh!! I forgot
at to submit to COMPULSORY
visi.com URINALYSIS!


> Anyhow, I wasn't trying to muster up anything or annoy anyone. My
> sincere apologies to all who were offended.



--
Grant Edwards grante Yow! I would like to
at urinate in an OVULAR,
visi.com porcelain pool --
 
Reply With Quote
 
Richard Blackwood
Guest
Posts: n/a
 
      10-05-2004
Andrew Dalke wrote:

> Richard Blackwood wrote:
>
>> Ouch! I didn't expect such harsh replies. Thanks anyways.

>
>
> That wasn't harsh. I answered 4 of your questions.
>
> 39. pointer to the documentation on that topic
> 30. no, Python uses a different style
> 28. that question doesn't make sense for Python -- variables
> only have one type
> 11. don't use eval (implying that Python has such a thing)
>
> and spent at least as much information in responding as
> you did in writing the questions in the first place.
>
> I even explained why I found your post to be problematical
> and left an opportunity for you to explain why my
> conjectures were wrong.
>
> Feel free to explain why we should put a lot of effort into
> replying to your email when it seems you've made no effort
> in answering the questions yourself, despite seeming to be
> quite capable of doing so.
>
> Andrew
> (E-Mail Removed)


OK. I idea was that someone who knew alot about one particular would
respond to that question, and other someone who knew alot about another
particular would respond to another question, and so forth. A poor
idea? Seeing the result, I guess so. Sorry to have bothered anyone.

When I said "harsh", I meant being accused of trolling, attempting to
annoy, stir trouble, etc. None which was my intent nor did I think that
my post would be interpreted as such (otherwise I wouldn't have posted it).

Thank you for your help.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are c++ features a subset of java features? BillJosephson C++ 148 01-27-2007 11:40 AM
ANN: New book on Java 5.0 new features & SCJP 5.0 upgrade exam kent@cpttm.org.mo Java 0 12-03-2006 02:04 AM
Two favorite features of C++, and over-rated, and misued features Jonathan Mcdougall C++ 2 11-03-2005 06:22 PM
Want to incorporate the new features in VS 2005 leighg@korbitec.com ASP .Net 0 05-20-2005 09:09 AM
IOS - new features S. Voigt Cisco 1 12-09-2003 11:39 PM



Advertisments