On Tuesday 02 June 2015 10:24, TheDoctor wrote:
> A type is not an object in the same way an instantiated type is an object
> -- anymore than a blueprint for a building is the building itself.
Nobody says that blueprints are *buildings*. But buildings are not the only
kind of object that exists.
On Tuesday 02 June 2015 10:10, TheDoctor wrote:
> On Friday, September 13, 2013 at 12:08:04 AM UTC-5, Steven D'Aprano wrote:
Mark, you are digging up a conversation from nearly two years ago.
Seriously?
>> It makes no difference whether I write:
>>
>> atoms -> stars -> galaxies
>>
>> or
On Tuesday 02 June 2015 12:14, fl wrote:
> Hi,
>
> I read the online help about string. It lists string constants, string
> formatting, template strings and string functions. After reading these,
> I am still puzzled about how to use the string module.
>
> Could you show me a few example about t
On Tuesday 02 June 2015 07:45, TheDoctor wrote:
> On Wednesday, September 11, 2013 at 6:40:22 PM UTC-5, Steven D'Aprano
> wrote:
>> On Wed, 11 Sep 2013 14:30:54 -0700, Mark Janssen wrote:
>>
>> > 1) It tried to make Object the parent of every class.
>>
>> Tried, and succeeded.
>
> Oh? How abou
On Tue, Jun 2, 2015 at 5:19 PM, Steven D'Aprano
wrote:
> but that's not what my second example says. Look closely, and consider that
> sometimes we write "Mark's hat" and sometimes "the hat of Mark".
... and sometimes "the hat Mark's talking through", which appears to
put "hat" and "Mark's" the o
On Tuesday, June 2, 2015 at 12:42:31 PM UTC+5:30, Steven D'Aprano wrote:
> On Tuesday 02 June 2015 10:24, TheDoctor wrote:
>
> > A type is not an object in the same way an instantiated type is an object
> > -- anymore than a blueprint for a building is the building itself.
>
> Nobody says that bl
On Tue, Jun 2, 2015 at 5:44 PM, Rustom Mody wrote:
>> Plates and spoons and knives and forks are objects.
>> Cars and trucks and ships and planes are objects.
>> Books and shoes and maps and compasses are objects.
>> Buildings are objects.
>> And blueprints of buildings are objects too.
>
> You ar
I would like to get into Machine learning. The problem I have is that my Math
skills are sadly lacking. I went through SKlearn docs but it is beyond me.
Could anyone recommended some resources to get up to speed with the subject?
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, June 2, 2015 at 2:08:08 PM UTC+5:30, Chris Angelico wrote:
> On Tue, Jun 2, 2015 at 5:44 PM, Rustom Mody wrote:
> >> Plates and spoons and knives and forks are objects.
> >> Cars and trucks and ships and planes are objects.
> >> Books and shoes and maps and compasses are objects.
> >> B
Chris Angelico :
> On Tue, Jun 2, 2015 at 5:44 PM, Rustom Mody wrote:
>> 1 ∈ all these
>> Are the '∈'s here same? Similar?
>
> Yes, they are. Every one of them is asserting (or asking, depending on
> your point of view) whether or not the instance to its left is a
> member of the set to its righ
In a message of Mon, 01 Jun 2015 19:14:18 -0700, fl writes:
>Hi,
>
>I read the online help about string. It lists string constants, string
>formatting, template strings and string functions. After reading these,
>I am still puzzled about how to use the string module.
>
>Could you show me a few ex
On 06/02/2015 11:16 AM, chrismeek4...@gmail.com wrote:
I would like to get into Machine learning.
An Introduction to Statistical Learning:
http://www-bcf.usc.edu/~gareth/ISL/
and corresponding MOOC.
SKLearn and Statsmodels mailing lists:
http://dir.gmane.org/gmane.comp.python.scikit-learn
htt
https://www.udacity.com/course/intro-to-machine-learning--ud120
Free online course using Python.
Laura
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, May 31, 2015 at 5:34:20 PM UTC+3, Eddilbert Macharia wrote:
> Hello All ,
>
> I'm wrecking my head trying to understand. where the class object comes into
> play .
>
> Is it only meant to act as base class and does it mean there is an actual
> class called object in python which all
On 01/06/2015 23:59, BartC wrote:
In the new class style, type and class sort of mean the same thing.
I'm developing a new language along the lines of Python,
(After reading some of the rest of the sub-thread, I'm glad I reined in
some of the proposed changes to my existing language to make
On 02/06/2015 11:36, Eddilbert Macharia wrote:
you guys are just confusing me, you are going in loops, and still i have
understood ,what makes everything in python an object.
After 14 or more years writing Python I can't really answer that and
quite frankly it doesn't worry me as I can quite
On Tuesday, June 2, 2015 at 4:16:02 PM UTC+5:30, BartC wrote:
> On 01/06/2015 23:59, BartC wrote:
>
> >> In the new class style, type and class sort of mean the same thing.
> >
> > I'm developing a new language along the lines of Python,
>
> (After reading some of the rest of the sub-thread, I'm
Hi,
Currently, in various places in my code, I have the equivalent of:
for x in it:
if complicated_calculation_1():
cleanup()
break
complicated_calculation_2()
if complicated_calculation_3():
cleanup()
break
Obviously, I'm repeating myself by having tw
On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote:
> you guys are just confusing me, you are going in loops, and still i have
> understood ,what makes everything in python an object. hey is where i'm at
> : *** type in python refers to data types e.g. int, str, boolean e.t.c.
> right ?
Yes. A
On Tuesday, June 2, 2015 at 4:57:31 PM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote:
>
> > you guys are just confusing me, you are going in loops, and still i have
> > understood ,what makes everything in python an object. hey is where i'm at
> > : *** t
I think there is essentially zero chance of that. My understanding is that
Guido regrets having "else" to begin with.
But this should work
broken = True
for x in it:
if complicated_calculation_1():
break
complicated_calculation_2()
if complicated_calculation_3():
brea
Thank you both. Just what i was looking for
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I have a list:
>>> lines
['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100']
I want to access the last two digits. That is:
['12', '42', '49', '56', '25', '36', '49', '64', '81', '00']
When I try to use lines[3][0] is '1'
lines[3][1] is '5'
lines[3][2] is '6'
I d
acdr wrote:
> Hi,
>
> Currently, in various places in my code, I have the equivalent of:
>
> for x in it:
> if complicated_calculation_1():
> cleanup()
> break
> complicated_calculation_2()
> if complicated_calculation_3():
> cleanup()
> break
>
> Obv
On Tue, Jun 2, 2015 at 8:23 AM, fl wrote:
> Hi,
>
> I have a list:
>
>
>
>
>
>
lines
> ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100']
>
>
>
> I want to access the last two digits. That is:
>
> ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00']
>
>
> When I try
fl wrote:
---snip
lines
> ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100']
>
>
>
> I want to access the last two digits. That is:
>
> ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00']
>
>
> When I try to use lines[3][0] is '1'
> lines[3][1] is '5'
> l
- Original Message -
> From: "acdr"
> To: python-list@python.org
> Sent: Tuesday, 2 June, 2015 1:26:42 PM
> Subject: for...else
>
> Hi,
>
> Currently, in various places in my code, I have the equivalent of:
>
> for x in it:
> if complicated_calculation_1():
> cleanup()
>
On Tuesday, June 2, 2015 at 5:53:34 PM UTC+5:30, fl wrote:
> Hi,
>
> I have a list:
>
>
>
>
>
>
> >>> lines
> ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100']
>
>
>
> I want to access the last two digits. That is:
>
> ['12', '42', '49', '56', '25', '36', '49', '64', '
I am want to know which are the best CMS / framework for building web banking
/ Financial / lending services
Best
--
https://mail.python.org/mailman/listinfo/python-list
On 02/06/2015 12:27, Steven D'Aprano wrote:
"Object" has a general meaning in computer science and programming, it is a
compound data structure that is explicitly linked to a type which provides
functionality that operates on that data structure.
In the programming language C, *no* values are o
That would work for my example, but it would only really work if all
the calculations are in a nice function. If I just have a block of
code, then I can't use it as easily. (E.g. replace
"complicated_calculation_2()" by multiple lines of code, which I don't
want to shove into a separate function.)
Hello !
I have this kind of message every time I quit my PyQt4 app whatever the method
to quit is: a quit action menu, the windows "red cross", by quit(), close(),
destroy(), deletelater(), ...
"python.exe has stopped working"
->Check online for a solution
->Close the program
I need to specify
BartC :
> If you define 'object' in a certain way (eg. as boxed, tagged data),
> then it follows that some values don't need to be objects.
The word "object" really barely carries any meaning -- that's the point.
It's a Latin-based synonym of the Germanic "thing."
To say that everything is an ob
On 2015-06-02, Skybuck Flying wrote:
>
> {
>
>
>{
>
>}
> }
IOW, it's almost, but not quite, JSON.
--
Grant Edwards grant.b.edwardsYow! My vaseline is
at RUNNING...
gmai
- Original Message -
> From: "acdr"
> To: "Jean-Michel Pichavant"
> Cc: python-list@python.org
> Sent: Tuesday, 2 June, 2015 2:52:21 PM
> Subject: Re: for...else
>
> That would work for my example, but it would only really work if all
> the calculations are in a nice function.
You cann
Reviving (and concluding) a thread I started a couple weeks ago, I asked:
> The basic fork/exec dance is not a problem, but how do I discover
> all the open file descriptors in the new child process to make sure
> they get closed? Do I simply start at fd 3 and call os.close() on
> everything up to
The first solution in your e-mail (with a Cleanup exception) is
definitely very close, functionally, to what I want to accomplish. In
effect, it's the same structure as my original suggestion of
"for...then...else", except now it'd be "try: for...else...except".
That's workable. I can even cheat an
In a message of Tue, 02 Jun 2015 05:41:31 -0700, Swapnil Bhadade writes:
> I am want to know which are the best CMS / framework for building web banking
> / Financial / lending services
>Best
>--
>https://mail.python.org/mailman/listinfo/python-list
See this video.
https://ep2013.europython
In a message of Tue, 02 Jun 2015 06:09:34 -0700, Alexis Dubois writes:
>Hello !
>
>I have this kind of message every time I quit my PyQt4 app whatever the method
>to quit is: a quit action menu, the windows "red cross", by quit(), close(),
>destroy(), deletelater(), ...
>
>"python.exe has stopped
On Tue, Jun 2, 2015 at 6:35 AM, Rustom Mody wrote:
> For that matter even this works
> But I am not sure whats happening or that I like it
>
[x[-2:] for x in lines]
> ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00']
x[-2:] selects all items in the sequence with index i such that
You may be looking for dictionary dispatching.
You can translate the key into a callable.
def do_ping(self, arg):
return 'Ping, {0}!'.format(arg)
def do_pong(self, arg):
return 'Pong, {0}!'.format(arg)
dispatch = {
'ping': do_ping,
'pong': do_pong
}
and then at some poi
On Tuesday, June 2, 2015 at 4:13:27 PM UTC+2, Laura Creighton wrote:
> In a message of Tue, 02 Jun 2015 06:09:34 -0700, Alexis Dubois writes:
> >Hello !
> >
> >I have this kind of message every time I quit my PyQt4 app whatever the
> >method to quit is: a quit action menu, the windows "red cross",
On Tue, 2 Jun 2015 09:40 pm, Rustom Mody wrote:
> On Tuesday, June 2, 2015 at 4:57:31 PM UTC+5:30, Steven D'Aprano wrote:
>> On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote:
[...]
>> > *** The instance of class type is a data type an instance of class
>> > type. right ?
>> type(type)
>>
On Mon, Jun 1, 2015 at 4:59 PM, BartC wrote:
> I'm developing a new language along the lines of Python, perhaps a brief
> description of how things are done there might help. Or just give a
> different perspective.
>
> Objects in this language are tagged: there's a code attached to each
> indicati
On Tue, 2 Jun 2015 10:23 pm, fl wrote:
> I don't know whether there is a way to know the length of lines[3].
The same way as to know the length of anything else:
len(x) # the length of x
len("hello") # the length of "hello"
len(lines[3]) # the length of lines[3]
> Then,
> I can use a -1 ste
- Original Message -
> From: "acdr"
> To: "Jean-Michel Pichavant"
> Cc: python-list@python.org
> Sent: Tuesday, 2 June, 2015 4:00:12 PM
> Subject: Re: for...else
>
> The first solution in your e-mail (with a Cleanup exception) is
> definitely very close, functionally, to what I want to a
Skip Montanaro :
> os.closerange(fd_low, fd_high)
> Close all file descriptors from fd_low (inclusive) to fd_high
> (exclusive), ignoring errors.
>
> Guido's time machine strikes again...
The only problem is that you don't know how high you need to go in
general.
Marko
--
https://m
On Tue, Jun 2, 2015 at 10:28 AM, Marko Rauhamaa wrote:
>
> The only problem is that you don't know how high you need to go in
> general.
Sure, but I didn't know anyway, so no matter what upper bound I choose
(or what function I choose/implement), it's just going to be a guess.
os.closerange just
Respected: Thanks. Would you mind if , i ask you more detail Q’s on the
framework. If not then any resources where i can i ask more Q’s ?
Best
Dr. Swapnil Bhadade
M.B.B.S
M.S
Yindu (India)
swapnilrbhadad...@gmail.com.
………..
Please a
Skip Montanaro writes:
> Reviving (and concluding) a thread I started a couple weeks ago, I asked:
>
>> The basic fork/exec dance is not a problem, but how do I discover
>> all the open file descriptors in the new child process to make sure
>> they get closed? Do I simply start at fd 3 and call o
In a message of Tue, 02 Jun 2015 21:09:48 +0530, Swapnil writes:
>
>
>Respected: Thanks. Would you mind if , i ask you more detail Q’s on the
>framework. If not then any resources where i can i ask more Q’s ?
>
>Best
>Dr. Swapnil Bhadade
You can ask more questions here. I just remembered that th
On Tuesday, June 2, 2015 at 8:38:42 PM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 2 Jun 2015 09:40 pm, Rustom Mody wrote:
>
> > On Tuesday, June 2, 2015 at 4:57:31 PM UTC+5:30, Steven D'Aprano wrote:
> >> On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote:
> [...]
> >> > *** The instance of cla
On 6/2/2015 6:36 AM, Eddilbert Macharia wrote:
you guys are just confusing me, you are going in loops,
Ignore the troll who is trying to confuse you by slandering the rest of
us. I have been using python for 18 years, I believe. Current Python
has a loop at the core
>>> isinstance(type, o
Skip Montanaro :
> On Tue, Jun 2, 2015 at 10:28 AM, Marko Rauhamaa wrote:
>>
>> The only problem is that you don't know how high you need to go in
>> general.
>
> Sure, but I didn't know anyway, so no matter what upper bound I choose
> (or what function I choose/implement), it's just going to be
On 2015-06-02, Marko Rauhamaa wrote:
> Skip Montanaro :
>
>> On Tue, Jun 2, 2015 at 10:28 AM, Marko Rauhamaa wrote:
>>>
>>> The only problem is that you don't know how high you need to go in
>>> general.
>>
>> Sure, but I didn't know anyway, so no matter what upper bound I choose
>> (or what func
On 2015-06-02 05:45, Skybuck Flying wrote:
Example for python:
MyString = "Hello World"
print MyString.rfind("World")
if MyString.rfind("World"):
print "yes"
else:
print "no"
Pretty cool.
.rfind returns the index if found, -1 if not found.
"World".rfind("World") returns 0, which will be tre
I am thinking about using ipython3 instead of bash. When I want to
find a file I can do the following:
!find ~ -iname '*python*.pdf'
but is there a python way?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
--
https://mail.python.org/mailman/l
On 2015-06-02 04:37, Mark Lawrence wrote:
> > I read the online help about string. It lists string constants,
> > string formatting, template strings and string functions. After
> > reading these, I am still puzzled about how to use the string
> > module.
>
> I suggest you don't bother, it's effec
On Fri, 29 May 2015 12:00 pm, Steven D'Aprano wrote:
[...]
> in a language where classes are
> themselves values, there is no reason why a class must be instantiated,
> particularly if you're only using a single instance of the class. Anyone
> ever come across a named design pattern that involves
On Tue, 2 Jun 2015 10:49 pm, BartC wrote:
> On 02/06/2015 12:27, Steven D'Aprano wrote:
>
>> "Object" has a general meaning in computer science and programming, it is
>> a compound data structure that is explicitly linked to a type which
>> provides functionality that operates on that data struct
"MRAB" wrote in message
news:mailman.71.1433263397.13271.python-l...@python.org...
On 2015-06-02 05:45, Skybuck Flying wrote:
Example for python:
MyString = "Hello World"
print MyString.rfind("World")
if MyString.rfind("World"):
print "yes"
else:
print "no"
Pretty cool.
"
.rfind retur
Steven D'Aprano :
> On Fri, 29 May 2015 12:00 pm, Steven D'Aprano wrote:
>
> [...]
>> in a language where classes are
>> themselves values, there is no reason why a class must be instantiated,
>> particularly if you're only using a single instance of the class. Anyone
>> ever come across a named
"Laura Creighton" a écrit dans le message de
news:mailman.64.1433255400.13271.python-l...@python.org...
You may be looking for dictionary dispatching.
You can translate the key into a callable.
def do_ping(self, arg):
return 'Ping, {0}!'.format(arg)
def do_pong(self, arg):
return 'Pon
On 02/06/2015 18:00, Steven D'Aprano wrote:
On Tue, 2 Jun 2015 10:49 pm, BartC wrote:
On 02/06/2015 12:27, Steven D'Aprano wrote:
In the programming language Java, *some* values are objects, and some
values are not objects.
In the programming language Python, *all* values are objects, in th
On Tue, Jun 2, 2015, at 13:59, BartC wrote:
> On 02/06/2015 18:00, Steven D'Aprano wrote:
> > Again, this is not relevant. Javascript is dynamically typed, but some
> > values are machine primitives and other values are objects. The interpreter
> > keeps track of this at runtime.
>
> Javascript
On 2015-06-02, BartC wrote:
> On 02/06/2015 18:00, Steven D'Aprano wrote:
>> Again, this is not relevant. Javascript is dynamically typed, but some
>> values are machine primitives and other values are objects. The interpreter
>> keeps track of this at runtime.
>
> Javascript primitives include Nu
On Tuesday, June 2, 2015 at 1:59:37 PM UTC-4, BartC wrote:
> On 02/06/2015 18:00, Steven D'Aprano wrote:
> > On Tue, 2 Jun 2015 10:49 pm, BartC wrote:
> >
> >> On 02/06/2015 12:27, Steven D'Aprano wrote:
>
> >>> In the programming language Java, *some* values are objects, and some
> >>> values are
In a message of Tue, 02 Jun 2015 19:46:54 +0200, "ast" writes:
>
>
>"Laura Creighton" a écrit dans le message de
>news:mailman.64.1433255400.13271.python-l...@python.org...
>> You may be looking for dictionary dispatching.
>>
>> You can translate the key into a callable.
>>
>> def do_ping(self, a
Hi,
I see the description of lambda at the online tutorial, but I cannot
understand it. '42' is transferred to the function. What 'x' value should
be? I do not see it says that it is '0'. And, what is 'x'?
>>> def make_incrementor(n):
... return lambda x: x + n
...
>>> f = make_increm
On Tue, Jun 2, 2015 at 11:14 AM, fl wrote:
> Hi,
>
> I see the description of lambda at the online tutorial, but I cannot
> understand it. '42' is transferred to the function. What 'x' value should
> be? I do not see it says that it is '0'. And, what is 'x'?
>
The lambda keyword is merely anothe
On 2015-06-02, Dr. Bigcock wrote:
> It doesn't really do anything. No one uses integers as objects.
> (Any dissenters?)
Yes. *Everyone* uses integers as objects. Containers such as
lists and dictionaries and tuples etc contain objects. If
integers weren't objects then you wouldn't be able to put
"fl" a écrit dans le message de
news:323866d1-b117-4785-ae24-7d04c49bc...@googlegroups.com...
Hi,
def make_incrementor(n):
... return lambda x: x + n
...
f = make_incrementor(42)
f(0)
42
f(1)
43
make_incrementor is a fonction which return a function !
and the returned function jus
On Tue, Jun 2, 2015 at 12:10 PM, Ned Batchelder wrote:
> On Tuesday, June 2, 2015 at 1:59:37 PM UTC-4, BartC wrote:
>> Javascript primitives include Number and String.
>>
>> What does Python allow to be done with its Number (int, etc) and String
>> types that can't be done with their Javascript co
Alain Ketterlin :
> The close(2) manpage has the following warning on my Linux system:
>
> | Not checking the return value of close() is a common but
> | nevertheless serious programming error. It is quite possible that
> | errors on a previous write(2) operation are first reported at the
> | fina
Hi,
I try to learn sorted(). With the tutorial example:
>>> ff=sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})
>>> ff
[1, 2, 3, 4, 5]
I don't see what sorted does in this dictionary, i.e. the sequence of
1..5 is unchanged. Could you explain it to me?
Thanks,
--
https://mail.python.org/
On Tuesday, June 2, 2015 at 1:20:40 PM UTC-7, fl wrote:
> Hi,
>
> I try to learn sorted(). With the tutorial example:
>
>
>
>
> >>> ff=sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})
> >>> ff
> [1, 2, 3, 4, 5]
>
>
>
> I don't see what sorted does in this dictionary, i.e. the sequence of
>
>>> ff=sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})
>>> ff
[1, 2, 3, 4, 5]
sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'}) is equivalent to
sorted(iter({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'}))
and iter(dict) iterates over the dict keys, so when you do
iter({1: 'D', 2: 'B', 3: 'B', 4: 'E',
my_dict = {1: 'D', 2: 'B', 3: 'A', 4: 'E', 5: 'B'}
# dict.items() returns an iterator that returns pairs of (key, value) pairs
# the key argument to sorted tells sorted what to sort by,
operator.itemgetter is a factory function , itemgetter(1)== lambda
iterable: iterable[1]
sorted_dict = sorted(my
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> The close(2) manpage has the following warning on my Linux system:
>>
>> | Not checking the return value of close() is a common but
>> | nevertheless serious programming error. It is quite possible that
>> | errors on a previous write(2) operation a
On Monday, June 1, 2015 at 2:22:02 AM UTC-7, Marko Rauhamaa wrote:
> Sota-apina nakataan raastimeen.
> Apelle pane emit.
> Saarnaa takanani paatos.
>
> (= "The war monkey will be chucked into a grater.
> Hand the pistils to father-in-law.
> Pathos does prea
On 2015-06-02, Ian Kelly wrote:
>>> Sorry. I meant "object" in the sense of OOP: something you might
>>> extend or make a derived class with.
>>
>> I'm not sure you get to define which properties of objects you want
>> not to count.
>
> Accepting for the sake of argument that "something to be s
Hi,
I just see the tutorial says Python can return value in function, it does
not say multiple data results return situation. In C, it is possible.
How about Python on a multiple data return requirement?
Thanks,
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I find the following results are interesting, but I don't know the difference
between list() and list.
>>> nums=list()
>>> nums
[]
>>> xx=list
>>> xx
>>> nums
[]
>>> print(xx)
>>> print(nums)
[]
>>>
Could you tell me that?
Thanks,
--
https://mail.python.org/mailman/listinfo/pytho
On Tue, Jun 2, 2015 at 5:27 PM, fl wrote:
> Hi,
>
> I just see the tutorial says Python can return value in function, it does
> not say multiple data results return situation. In C, it is possible.
> How about Python on a multiple data return requirement?
>
>
> Thanks,
> --
> https://mail.python.o
On Tue, Jun 2, 2015 at 5:33 PM, fl wrote:
> Hi,
>
> I find the following results are interesting, but I don't know the difference
> between list() and list.
>
>
>
>
>
>
nums=list()
nums
> []
xx=list
xx
>
nums
> []
print(xx)
>
print(nums)
> []
>
>
>
> Could
In <3bbe49da-e989-4a8c-a8a9-75d3a786f...@googlegroups.com> fl
writes:
> Hi,
> I just see the tutorial says Python can return value in function, it does
> not say multiple data results return situation. In C, it is possible.
> How about Python on a multiple data return requirement?
Python func
On Tuesday, June 2, 2015 at 2:27:37 PM UTC-7, fl wrote:
> Hi,
>
> I just see the tutorial says Python can return value in function, it does
> not say multiple data results return situation. In C, it is possible.
> How about Python on a multiple data return requirement?
>
>
> Thanks,
You return
In <3ada3275-68c9-421c-aa19-53c312c42...@googlegroups.com> fl
writes:
> I find the following results are interesting, but I don't know the difference
> between list() and list.
'list()' invokes the list class, which creates and returns a new list.
Since you haven't passed any arguments, the lis
Alain Ketterlin :
> Marko Rauhamaa writes:
>> First, if close() fails, what's a poor program to do?
>
> Warn the user? Not assume everything went well? It all depends on the
> application, and what the file descriptor represents.
The problem here is in the system call contract, which is broken.
John Ladasky :
> On Monday, June 1, 2015 at 2:22:02 AM UTC-7, Marko Rauhamaa wrote:
>
>> Sota-apina nakataan raastimeen.
>> Apelle pane emit.
>> Saarnaa takanani paatos.
>>
>> (= "The war monkey will be chucked into a grater.
>> Hand the pistils to father-in-law.
>
Grant Edwards :
> On 2015-06-02, Ian Kelly wrote:
>> Accepting for the sake of argument that "something to be subclassed"
>> is a reasonable definition of object,
>
> Huh? You can't subclass an object. You can subclass a Class.
More to the point: you don't need classes for objects -- even in t
On Wed, Jun 3, 2015 at 7:06 AM, Alain Ketterlin
wrote:
> I've no idea what the OP's program was doing, so I'm not going to split
> hairs. I can't imagine why one would like to mass-close an arbitrary set
> of file descriptors, and I think APIs like os.closerange() are toxic and
> an appeal to slop
On Wed, Jun 3, 2015 at 7:27 AM, fl wrote:
> I just see the tutorial says Python can return value in function, it does
> not say multiple data results return situation. In C, it is possible.
> How about Python on a multiple data return requirement?
Technically, neither C nor Python can return mult
On Wed, Jun 3, 2015 at 6:25 AM, fl wrote:
> I am still new to Python. How to get the sorted dictionary output:
>
> {1: 'D', 2: 'B', 3: 'A', 4: 'E', 5: 'B'}
Since dictionaries don't actually have any sort of order to them, the
best thing to do is usually to simply display it in order. And there's
On Tue, Jun 2, 2015 at 3:47 PM, Mark Lawrence wrote:
> The classic response to "Super Considered Harmful" for those who may be
> interested is
> https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ and
> recently https://www.youtube.com/watch?v=EiOglTERPEo
I feel slightly cheated.
Folks, I'm not interested in rehashing this. I don't know what all the
open file descriptors are. Some/many/most will have been opened by
underlying C++ libraries and will not have been opened by code at the
Python level. I do think the addition of an os.fsync() attempt on each
file descriptor befo
On Tue, Jun 2, 2015 at 11:19 AM, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> On Fri, 29 May 2015 12:00 pm, Steven D'Aprano wrote:
>>
>> [...]
>>> in a language where classes are
>>> themselves values, there is no reason why a class must be instantiated,
>>> particularly if you're only using a s
Using paramiko's exec_command(), i would like to send a command, process its
output and do it for several other commands. I notice that its not quick enough
or something like that.
How would I handle that scenario AND also providing multiple commands together
(there is 1 post on stackoverflow f
On Tuesday, June 2, 2015 at 2:27:31 PM UTC+3, Steven D'Aprano wrote:
> On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote:
>
> > you guys are just confusing me, you are going in loops, and still i have
> > understood ,what makes everything in python an object. hey is where i'm at
> > : *** type
On 03/06/2015 05:16, Eddilbert Macharia wrote:
Sadly yes i have worked with java, and that is what is causing me so much
grief.In java objects are instance of a class.pretty simple.
You might like to read
http://dirtsimple.org/2004/12/python-is-not-java.html and
http://dirtsimple.org/2004/
100 matches
Mail list logo