On 2013-07-03 13:19:26 +, Steven D'Aprano said:
On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote:
Goodness, I doubt if you'll find anyone who can seriously make a case
that the Windows command prompt is all it might be. I'm not a Powershell
user myself but people speak highly of it.
Zentrader wrote:
On Mar 22, 10:07 am, Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Mar 22, 4:38 pm, Zentrader [EMAIL PROTECTED] wrote:
if ('one', 'two') are in f: ...
are gives me an error in Python 2.5 with a from future import *
statement included. What version and platform are you
jmDesktop wrote:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Linux and Python are a nearly
Larry Bates wrote:
jmDesktop wrote:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Thank you.
Arnaud Delobelle wrote:
Anyway, here the conclusion that I draw: learn lambda-calculus and
Turing machines. The rest is syntactic sugar.
How is the lambda-calculus fundamentally different from Turing
machine-based implementations?
I've been learning a fair amount about functional
Paul Rubin wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
ftping it as a flat file, and untarring it on the other side. Of
course, the motivation wasn't just to get the files from point A to
point B using Unix (which I already know how to do), but to take
advantage of an opportunity to learn
Jonathan Gardner wrote:
On Mar 20, 4:51 am, Giampaolo Rodola' [EMAIL PROTECTED] wrote:
Is there any way to su or login as a different user within a python
script? I mainly need to temporarily impersonate another user to
execute a command and then come back to the original user.
In the unix
Grant Edwards wrote:
On 2008-03-20, jmDesktop [EMAIL PROTECTED] wrote:
Hi, I'm trying to learn Python. I using Aquamac an emac
implementation with mac os x. I have a program. If I go to the
command prompt and type pythong myprog.py, it works. Can the program
be run from within the
jmDesktop wrote:
On Mar 20, 11:21 am, Grant Edwards [EMAIL PROTECTED] wrote:
On 2008-03-20, jmDesktop [EMAIL PROTECTED] wrote:
Hi, I'm trying to learn Python. I using Aquamac an emac
implementation with mac os x. I have a program. If I go to the
command prompt and type pythong myprog.py,
Paulo da Costa wrote:
People who say Emacs often mean GNU Emacs.
That's funny; to me, Emacs usually means XEmacs. :)
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
On 2008-03-20, Jeff Schwab [EMAIL PROTECTED] wrote:
http://www.google.com/search?q=emacs+python
Gee. Thanks.
I believe Grant was suggesting that Emacs often serves a similar purpose
on Unix to what Visual Studio does on Windows, which seemed to be what
you were
Marc Christiansen wrote:
sturlamolden [EMAIL PROTECTED] wrote:
On 18 Mar, 00:58, Jeff Schwab [EMAIL PROTECTED] wrote:
def make_slope(distance, parts):
if parts == 0:
return []
q, r = divmod(distance, parts)
if r and parts % r:
q += 1
return [q
Mike Driscoll wrote:
On Mar 18, 1:41 pm, fumanchu [EMAIL PROTECTED] wrote:
On Mar 17, 6:25 pm, dundeemt [EMAIL PROTECTED] wrote:
I agree - the balance wasn't as good. We can all agree that HowTos
and Intros are a necessary part of the conference talks track, but as
Robert pointed out some
I need to move a directory tree (~9GB) from one machine to another on
the same LAN. What's the best (briefest and most portable) way to do
this in Python?
I see that urllib has some support for getting files by FTP, but that it
has some trouble distinguishing files from directories.
Gabriel Genellina wrote:
En Tue, 18 Mar 2008 18:25:28 -0300, Jeff Schwab [EMAIL PROTECTED]
escribió:
I need to move a directory tree (~9GB) from one machine to another on
the same LAN. What's the best (briefest and most portable) way to do
this in Python?
See Tools/scripts/ftpmirror.py
Girish wrote:
I have a string a = ['xyz', 'abc'].. I would like to convert it to a
list with elements 'xyz' and 'abc'. Is there any simple solution for
this??
Do you want:
(1) Specifically to vivify lists formatted as in your example? If so, why?
(2) To save and restore arbitrary python
Tom Stambaugh wrote:
I continue to receive emails, addressed to [EMAIL PROTECTED],
with subject: Re: Your message to Python-list awaits moderator approval,
which read:
Your mail to 'Python-list' with the subject
(no subject)
Is being held until the list moderator can review it for
James Whetstone wrote:
I'm trying to access a PyObject directly from C++ for the purpose of calling
method on a Python object that is an intance of a derived C++ class. My
problem is that the compiler is complaining about not PyObject not being
defined. Has anyone run into the problem?
waltbrad wrote:
I'm proceeding slowly though the Lutz book Programming Python. I'm
in the section on named pipes. The script he uses has two functions:
one for the child the other for the parent. You start the parent then
the child:
python pipefifo.py #starts the parent
file
BJörn Lindqvist wrote:
Here is an interesting math problem:
You have a number X 0 and another number Y 0. The goal is to
divide X into a list with length Y. Each item in the list is an
integer. The sum of all integers is X. Each integer is either A or A +
1, those should be evenly
sturlamolden wrote:
On 17 Mar, 04:54, WaterWalk [EMAIL PROTECTED] wrote:
So I'm curious how to read code effectively. I agree that python code
is clear, but when it becomes long, reading it can still be a hard
work.
First, I recommend that you write readable code! Don't use Python as
if
Arnaud Delobelle wrote:
On Mar 17, 10:24 pm, BJörn Lindqvist [EMAIL PROTECTED] wrote:
Here is an interesting math problem:
You have a number X 0 and another number Y 0. The goal is to
divide X into a list with length Y. Each item in the list is an
integer. The sum of all integers is X.
[EMAIL PROTECTED] wrote:
So I need to recursively grep a bunch of gzipped files. This can't be
easily done with grep, rgrep or zgrep. (I'm sure given the right
pipeline including using the find command it could be donebut
seems like a hassle).
So I figured I'd find a fancy next
Benjamin Serrato wrote:
P.S. What is the chance I'll get spam for using my real email address?
Fendi Chef Bag in Zucca Print - Black Trim Replica AAA, Fake HandBags
Cheap
Chef Bag in Zucca Print - Black Trim Bags Link :
http://www.cnreplicas.com/Fendi_1439.html
Chef Bag in Zucca Print - Black
Ben Finney wrote:
sturlamolden [EMAIL PROTECTED] writes:
If you don't know how to install a C compiler like Microsoft Visual
Studio, you should not be programming computers anyway.
Utter elitist nonsense.
Programming should be made easier, and I see Python as a very good
language for
Aahz wrote:
In article [EMAIL PROTECTED],
Tim Roberts [EMAIL PROTECTED] wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
Roel Schroeven wrote:
[EMAIL PROTECTED] schreef:
On Mar 14, 1:47 pm, Reedick, Andrew [EMAIL PROTECTED] wrote:
How do you feel about creator of Eliza?
What is Eliza?
Does
Chris wrote:
On Mar 14, 8:36 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 13 Mar 2008 21:28:18 -0700 (PDT), jai_python
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
hi frenz I Need a Python Script For read multiple files(.txt) from a
folder and write it in a
Roel Schroeven wrote:
[EMAIL PROTECTED] schreef:
On Mar 14, 1:47 pm, Reedick, Andrew [EMAIL PROTECTED] wrote:
Subject: RIP: Joseph Weizenbaum
Creator of Eliza:
http://www-tech.mit.edu/V128/N12/weizenbaum.html
--
How do you feel about creator of Eliza?
What is Eliza?
Does that question
Paddy wrote:
On Mar 13, 7:03 pm, Jonathan Gardner [EMAIL PROTECTED]
wrote:
On Mar 12, 6:37 pm, Carl Banks [EMAIL PROTECTED] wrote:
Snip
And leave out the magical -p and -n. If you want to iterate through a
file, for line in sys.stdin:.
Or better still:
import fileinput
for
Alex wrote:
The subject says pretty much all, i would very appreciate an answer. I
tried to search the various forums and groups, but didn't find any
specific answer...
I'd like an answer to this, too. In Perl, I mostly used it for
one-liners, when a variable needed to be initialized to
Bo wrote:
I want to port a Python project (about 10,000 line python code) to C+
+. Is there any automatically tool to do this kind of things? e.g.,
That's not trivial. Python is very heavily oriented toward run-time
processing, whereas C++ favors compile-time processing.
e.g.,
Roopan wrote:
I assume the C++/Python binding is fairly painless.
http://www.boost.org/libs/python/doc/tutorial/doc/html/index.html
A. :)
--
http://mail.python.org/mailman/listinfo/python-list
K Viltersten wrote:
I've been recommended reading of:
http://www.python.org/dev/peps/pep-0008/
and in there i saw two things that i need to get elaborated.
1. When writing English, Strunk and White apply.
Where can i download it? Am i actually
expected to read the whole book?
It's a
Dennis Lee Bieber wrote:
On Tue, 4 Mar 2008 20:06:38 -0500, Tommy Grav [EMAIL PROTECTED] declaimed
the following in comp.lang.python:
SV = Svar is the Norwegian word for Reply.
Ah, good... In my working life, SV = Space Vehicle, often used
to differentiate between the base satellite
Dennis Lee Bieber wrote:
On Wed, 05 Mar 2008 08:26:04 -0800, Jeff Schwab [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
Which is which? Aren't those both part of the space vehicle? Btw, do
you work for government or industry? Do you enjoy working with the
space program
What does SV in the subject mean?
--
http://mail.python.org/mailman/listinfo/python-list
Tommy Grav wrote:
On Mar 4, 2008, at 4:53 PM, Jeff Schwab wrote:
What does SV in the subject mean?
SV = Svar is the Norwegian word for Reply.
Thanks. Serves me right for not speaking Norwegian.
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
I can live with int/int=float but
find it sloppy and would be happier if int/int always threw an error
(convert explicitly if you want a particular type result).
Better yet, how hard would it be to define an otherwise int-like type
that did not define a non-flooring division
Ira Solomon wrote:
I am an experienced programmer (40 years) . . .
I'm interested in learning Python
js wrote:
I wonder why nobody mension Python Cookbook yet . . .
and Python Standard Library
Because cookbooks are not supposed to be language introductions. They
are collections of
Christoph Zwerschke wrote:
Marc 'BlackJack' Rintsch schrieb:
On Sun, 02 Mar 2008 14:15:09 +, Steve Turner wrote:
Apart from doing something like
a=[0,0,0]
b=[0,0,0]
c=[0,0,0]
d=[a,b,c]
is there a better way of creating d??
a = [[0] * 3 for dummy in xrange(3)]
Each element of a
Paul Rubin wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
Better yet, how hard would it be to define an otherwise int-like type
that did not define a non-flooring division operator? Are there any
real use cases for such a type?
User defined types in python are fairly heavyweight compared
[EMAIL PROTECTED] wrote:
is there a better way of creating d??
a = [[0] * 3 for dummy in xrange(3)]
Each element of a refers to a distinct array.
Why not simply [[0]*3]*3 ?
All three elements of the result refer to the same array.
... whereas you reassign all three elements of [0]* 3.
Ira Solomon wrote:
I am an experienced programmer (40 years). I've done Algol (if you've
heard of that you must be old too), PL/1, VB,VBA, a little C, and a
few other odd languages (e.g. Taskmate).
I'm interested in learning Python and have downloaded a slew of books.
Too many.
I'd like a
Marc 'BlackJack' Rintsch wrote:
On Wed, 27 Feb 2008 19:18:27 -0800, Jeff Schwab wrote:
Benoit wrote:
I've been teaching myself the python language over the past few months
using Mark Lutz' Learning Python, 3ed. Python is also the first
programming language I've ever taken up. I find
Marc 'BlackJack' Rintsch wrote:
On Thu, 28 Feb 2008 10:34:45 -0800, Jeff Schwab wrote:
Hey a flame bait. I'll bite.
Excuse me? Somebody posts about an introductory course on C++ covering
dynamic arrays using pointers and literally says kill me now, and
I'm the flamer for asking him
Benoit wrote:
Forgive my language concerning C++ as its turned the thread into
something I did not intend. I merely wished to point out that Python
was easier for me to learn than C++. To Schwab, its likely that Mark
Lutz is simply a better instructor than my professor.
Sorry for hijacking
Aahz wrote:
In article [EMAIL PROTECTED],
Carl Banks [EMAIL PROTECTED] wrote:
On Feb 24, 7:03 pm, [EMAIL PROTECTED] (Aahz) wrote:
In article [EMAIL PROTECTED],
Jeff Schwab [EMAIL PROTECTED] wrote:
(3) Garbage collection is at least as desirable a language feature as
deterministic
Benoit wrote:
I've been teaching myself the python language over the past few months
using Mark Lutz' Learning Python, 3ed. Python is also the first
programming language I've ever taken up. I find the language easy to
learn and rather productive in relation to the introductory course on C
J. Cliff Dyer wrote:
On Tue, 2008-02-26 at 04:29 -0800, Lie wrote:
J Cliff Dyer:
I'm in the camp that believes that 3/4 does indeed yield the integer
0,
but should be spelled 3//4 when that is the intention.
That's creepy for people that are new to programming and doesn't know
how CPUs work
Nicola Musatti wrote:
On Feb 24, 5:25 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
there's actually a published book specifically about C++ pitfalls.
Mercy, a whole book?
http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=97802...
Read
Jeff Schwab wrote:
Nicola Musatti wrote:
On Feb 24, 5:25 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
there's actually a published book specifically about C++ pitfalls.
Mercy, a whole book?
http://search.barnesandnoble.com/booksearch/isbnInquiry.asp
Dennis Lee Bieber wrote:
On Mon, 25 Feb 2008 17:48:21 -0800, Jeff Schwab [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
What about curses?
http://docs.python.org/lib/module-curses.html
http://adamv.com/dev/python/curses/
I don't consider needing a 3rd party library
[EMAIL PROTECTED] wrote:
On Feb 26, 10:59 am, Preston Landers [EMAIL PROTECTED] wrote:
On Feb 26, 1:45 am, [EMAIL PROTECTED] wrote:
Two options occurred to me, which the first showed up in the earlier
extremely skeletal and cryptic post:
Perhaps you would be more likely to get the kind of
Grant Edwards wrote:
I guess it must depend on where you went to shool.
Temple Israel. You?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
On Feb 26, 11:37 am, Jeff Schwab [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Feb 26, 10:59 am, Preston Landers [EMAIL PROTECTED] wrote:
On Feb 26, 1:45 am, [EMAIL PROTECTED] wrote:
Two options occurred to me, which the first showed up in the earlier
[EMAIL PROTECTED] wrote:
On Feb 26, 12:04 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Feb 26, 11:37 am, Jeff Schwab [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Feb 26, 10:59 am, Preston Landers [EMAIL PROTECTED] wrote:
On Feb 26, 1:45 am, [EMAIL PROTECTED
[EMAIL PROTECTED] wrote:
On Feb 26, 12:37 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Feb 26, 12:04 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Feb 26, 11:37 am, Jeff Schwab [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Feb 26, 10:59
J. Cliff Dyer wrote:
On Tue, 2008-02-26 at 13:51 -0500, D'Arcy J.M. Cain wrote:
On Tue, 26 Feb 2008 13:39:38 -0500
J. Cliff Dyer [EMAIL PROTECTED] wrote:
a = 2 * 2
b = 20 * 20
type(a)
type 'int'
type(b)
type 'long'
A long int is still integral which is the crux of the
Paul Rubin wrote:
D'Arcy J.M. Cain [EMAIL PROTECTED] writes:
http://en.wikipedia.org/wiki/Natural_number
Recheck the context. I was talking about the natural result, not
natural numbers.
The natural result of doing arithmetic with natural numbers is more
natural numbers.
Back when I
Grant Edwards wrote:
On 2008-02-26, Jeff Schwab [EMAIL PROTECTED] wrote:
Grant Edwards wrote:
I guess it must depend on where you went to shool.
Temple Israel. You?
Good one. :)
I make a lot of typo's on Usenet, so I'm always secretly relieved when
other people do, too. (IOW, thanks
[EMAIL PROTECTED] wrote:
On Feb 26, 12:42 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
...
th1 th2
set cmd
run cmd
get result
acknowledge
continue continue
th2 won't -run cmd- until th1 completes -set cmd-. th1 won't -get
result- until th2 completes -run cmd
D'Arcy J.M. Cain wrote:
On Tue, 26 Feb 2008 12:58:53 -0800
Tobiah [EMAIL PROTECTED] wrote:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
But then again, when just adding a quip to a long thread in which
the readers have already
Mark Dickinson wrote:
On Feb 26, 9:00 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
Certainly, I'd expect that if x and y are both integers and x is an
exact multiple of y, then x/y will be computable and not overflow.
But try computing 10**5000 / 10**4000 under future division (that is
[EMAIL PROTECTED] wrote:
On Feb 24, 9:28 pm, George Sakkis [EMAIL PROTECTED] wrote:
[1]http://www.martinfowler.com/eaaCatalog/identityMap.html
[1] illustrates a case in which 'a is a' returns False, and in the
other corner of the DeMorgan table, there is 'a is b' returns True for
'a == b'
Dennis Lee Bieber wrote:
On Mon, 25 Feb 2008 10:35:54 -0800 (PST), wyleu
[EMAIL PROTECTED] declaimed the following in
comp.lang.python:
I'm trying to read a single keypress on Linux but expect to have the
programme running on Windows platform as well and find the mention in
the FAQ:
Matthew Woodcraft wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
Matthew Woodcraft wrote:
I see. Then, unless you don't care about data loss passing silently,
this 'most traditional' way to open a file is unsuitable for files
opened for writing.
No, why would you think so? If you want
Larry Bugbee wrote:
And the migration to Python is due in large part because of an
additional factor of 3-4x in personal productivity (over Java).
Improvements in runtime performance wouldn't hurt, but for many
applications that's not an issue. (If optional data typing were
You mean static
Paul Lemelle wrote:
I am somewhat new to Python and I am trying to create a program that
automatically creates directories from a range of numbers. I
researched the os.mkdir os.makedirs methods, but they do not seem to
(I don't know) how to include an argumnet to step through my list.
I
[EMAIL PROTECTED] wrote:
Can someone explain this?
a= {}
Create an empty dict and bind it to the name a.
a[(3,)]= 0
Set the key/value pair (3,):0 to the dict.
(3,) in a
Is (3,) one of the keys in the dict?
True
Yes, it is.
(3,) is (3,)
Create two separate tuples (that happen to be
Bruno Desthuilliers wrote:
Jeff Schwab a écrit :
Bruno Desthuilliers wrote:
Carl Banks a écrit :
On Feb 20, 8:58 am, Tim Chase [EMAIL PROTECTED] wrote:
You Used Python to Write WHAT?
http://www.cio.com/article/185350
Furthermore, the power and expressivity that Python offers means
George Sakkis wrote:
On Feb 22, 2:15 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
Nicola Musatti wrote:
The real sad thing is that nobody is likely to convince Guido to turn
CPython into C++Python ;-)
How difficult would that be? Could it be done in stages? I would be
willing to spend some
Ryan Ginstrom wrote:
On Behalf Of Jeff Schwab
When I see this silliness again and again, it really breaks
my heart
If you allow your heart to be broken by others' opinions, you're setting
yourself up for a lot of disappointment IMHO.
It's not so much their opinions, as the fact
[EMAIL PROTECTED] wrote:
What you can't do (that I really miss) is have a tree of assign-and-test
expressions:
import re
pat = re.compile('some pattern')
if m = pat.match(some_string):
do_something(m)
else if m = pat.match(other_string):
Jeff Schwab wrote:
mrstephengross wrote:
Hi all. In C, an assignment statement returns the value assigned. For
instance:
int x
int y = (x = 3)
In the above example, (x=3) returns 3, which is assigned to y.
In python, as far as I can tell, assignment statements don't return
anything
Paul Rubin wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
The most traditional, easiest way to open a file in C++ is to use an
fstream object, so the file is guaranteed to be closed when the
fstream goes out of scope.
Python has this too, except it's using a special type of scope
created
Arnaud Delobelle wrote:
On Feb 23, 3:44 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
actions = (
('some_string', do_something),
('other_string', do_other_thing))
def find_action(pattern):
for string, action in actions:
m = pattern.match
Carl Banks wrote:
On Feb 23, 6:40 am, Jeff Schwab [EMAIL PROTECTED] wrote:
Recently, I've had a few replies in tones that imply I'm on the brink of
entering several kill-files, mostly because I express disagreement with
a few closely held beliefs of some other c.l.p posters.
A bit of advice
Matthew Woodcraft wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
The most traditional, easiest way to open a file in C++ is to use an
fstream object, so the file is guaranteed to be closed when the fstream
goes out of scope.
Out of interest, what is the usual way to manage errors
Terry Reedy wrote:
Jeff Schwab [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip discussion of 'with' statements]
| Yes, this seems to be the Python way: For each popular feature of some
| other language, create a less flexible Python feature that achieves the
| same effect
Paul Rubin wrote:
Terry Reedy [EMAIL PROTECTED] writes:
| Yes, this seems to be the Python way: For each popular feature of some
| other language, create a less flexible Python feature that achieves the
| same effect in the most common cases (e.g. lambda to imitate function
| literals, or
Matthew Woodcraft wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
Matthew Woodcraft wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
The most traditional, easiest way to open a file in C++ is to use an
fstream object, so the file is guaranteed to be closed when the fstream
goes out of scope
Paul Rubin wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
So to use the Perl example: If you want to sort a list using some
arbitrary snippet of code as the comparison function, you can write:
sort { code to compare $a and $b } @elements
Yes, you can do that in Python, using a lambda
Paul Rubin wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
One great thing about C is that
a programmer can realistically hope to know the entire language
definition; maybe Guido would like the same to be true of Python.
C is horrendously complicated, with zillions of obscure traps. C
Paul Rubin wrote:
Jeff Schwab [EMAIL PROTECTED] writes:
there's actually a published book specifically about C++ pitfalls.
Mercy, a whole book?
http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=9780201179286
C and C++ should practically be outlawed at this point.
On what
Carl Banks wrote:
On Feb 22, 12:23 am, Jeff Schwab [EMAIL PROTECTED] wrote:
Carl Banks wrote:
On Feb 21, 7:17 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
Carl Banks wrote:
On Feb 21, 1:22 pm, Nicola Musatti [EMAIL PROTECTED] wrote:
There are other downsides to garbage collection, as the fact
George Sakkis wrote:
On Feb 22, 12:26 am, Jeff Schwab [EMAIL PROTECTED] wrote:
On the other hand, a = b does always the same thing; unlike C++, '='
is not an operator and therefore it cannot be overriden by the class
of 'a'.
Not an operator? Then what is it?
In this context, it's just
Nicola Musatti wrote:
The real sad thing is that nobody is likely to convince Guido to turn
CPython into C++Python ;-)
How difficult would that be? Could it be done in stages? I would be
willing to spend some time on that kind of project. Since I know almost
nothing about Python
Max wrote:
Is there a Python equivalent of C++'s system()?
More or less. You probably want subprocess.Popen:
import subprocess
subprocess.Popen(echo hello, shell=True)
hello
subprocess.Popen object at 0x2ab8f3665d10
http://docs.python.org/lib/node533.html#CHILD_LINKS
--
Bruno Desthuilliers wrote:
Carl Banks a écrit :
On Feb 20, 8:58 am, Tim Chase [EMAIL PROTECTED] wrote:
You Used Python to Write WHAT?
http://www.cio.com/article/185350
Furthermore, the power and expressivity that Python offers means
that it may require more skilled developers.
[...down to
[EMAIL PROTECTED] wrote:
I'm very interesed to learn python and really willing to do so,but
unfortunately dont know where to start, or what programs need to
install to start.
There are several good replies already on this thread, but in case any
experienced programmers searching the Google
mrstephengross wrote:
Hi all. In C, an assignment statement returns the value assigned. For
instance:
int x
int y = (x = 3)
In the above example, (x=3) returns 3, which is assigned to y.
In python, as far as I can tell, assignment statements don't return
anything:
y = (x = 3)
John Henry wrote:
On Feb 21, 1:48 pm, John Henry [EMAIL PROTECTED] wrote:
On Feb 21, 1:43 pm, mrstephengross [EMAIL PROTECTED] wrote:
Hi all. In C, an assignment statement returns the value assigned. For
instance:
int x
int y = (x = 3)
In the above example, (x=3) returns 3, which is
mrstephengross wrote:
What you can't do (that I really miss) is have a tree of assign-and-test
expressions:
import re
pat = re.compile('some pattern')
if m = pat.match(some_string):
do_something(m)
Yep, this is exactly what I am (was) trying to do. Oh
[EMAIL PROTECTED] wrote:
On 21 fév, 23:19, John Henry [EMAIL PROTECTED] wrote:
On Feb 21, 2:06 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
John Henry wrote:
On Feb 21, 1:48 pm, John Henry [EMAIL PROTECTED] wrote:
On Feb 21, 1:43 pm, mrstephengross [EMAIL PROTECTED] wrote:
Hi all. In C
Carl Banks wrote:
On Feb 21, 1:22 pm, Nicola Musatti [EMAIL PROTECTED] wrote:
There are other downsides to garbage collection, as the fact that it
makes it harder to implement the Resource Acquisition Is
Initialization idiom, due to the lack of deterministic destruction.
That's not a
Terry Reedy wrote:
Jeff Schwab [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
| That's the same behavior I would expect in C, on the grounds that C
| What I found confusing at first was
| that the same variable will either directly store or merely refer to an
| object
[EMAIL PROTECTED] wrote:
On 21 fév, 23:06, Jeff Schwab [EMAIL PROTECTED] wrote:
John Henry wrote:
On Feb 21, 1:48 pm, John Henry [EMAIL PROTECTED] wrote:
On Feb 21, 1:43 pm, mrstephengross [EMAIL PROTECTED] wrote:
Hi all. In C, an assignment statement returns the value assigned. For
instance
Steve Holden wrote:
Jeff Schwab wrote:
[EMAIL PROTECTED] wrote:
[...]
Now there's no reason to feel nervous about this. All you have to
remember is that Python never copy anything unless explicitely asked
for.
It's not that simple. After a statement like:
a = b
Whether a and b
Steve Holden wrote:
mrstephengross wrote:
What you can't do (that I really miss) is have a tree of assign-and-test
expressions:
import re
pat = re.compile('some pattern')
if m = pat.match(some_string):
do_something(m)
Yep, this is exactly what I am
Carl Banks wrote:
On Feb 21, 7:17 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
Carl Banks wrote:
On Feb 21, 1:22 pm, Nicola Musatti [EMAIL PROTECTED] wrote:
There are other downsides to garbage collection, as the fact that it
makes it harder to implement the Resource Acquisition
1 - 100 of 222 matches
Mail list logo