On Wed, Jan 29, 2020 at 1:50 AM Random832 wrote:
>
> On Wed, Jan 22, 2020, at 02:34, Stephen Tucker wrote:
> > Oh dear, I am sorry. I have created quite a storm.
> >
> > Moreover, I am sorry because I misremembered what I had typed into Idle. My
> > original tuple only had two elements, not three,
On Wed, Jan 22, 2020, at 02:34, Stephen Tucker wrote:
> Oh dear, I am sorry. I have created quite a storm.
>
> Moreover, I am sorry because I misremembered what I had typed into Idle. My
> original tuple only had two elements, not three, so the slicing [:2] didn't
> affect the tuple at all - and s
On Tue, Jan 28, 2020 at 9:33 PM Daniel Haude wrote:
>
> Am 27.01.2020 15:23 schrieb Chris Angelico:
>
> > The way execution works in Python, you first evaluate the object, then
> > assign it to the target. The new object HAS to exist before the old
> > one is replaced. There's no such thing as "at
Am 27.01.2020 15:23 schrieb Chris Angelico:
The way execution works in Python, you first evaluate the object, then
assign it to the target. The new object HAS to exist before the old
one is replaced. There's no such thing as "atomic reassignment" that
simultaneously destroys the old object and a
On Tue, Jan 28, 2020 at 2:44 AM Souvik Dutta wrote:
>
> If the two objects have the same value that means that when called all of
> them will point to the same object rather than creating the same value -
> object pairs twice. Immutability is the characteristics that does not let you
> change t
On Tue, Jan 28, 2020 at 1:13 AM Musbur wrote:
>
> Am 21.01.2020 19:38 schrieb Chris Angelico:
> > Are you sure that it does? I can't reproduce this. When you slice the
> > first two from a tuple, you create a new tuple, and until the
> > assignment happens, both the new one and the original coexis
Am 21.01.2020 19:38 schrieb Chris Angelico:
On Wed, Jan 22, 2020 at 4:42 AM Stephen Tucker
wrote:
and even that the first id(mytup) returns the same address as the
second
one, I am left wondering exactly what immutability is.
Let's look at id()'s documentation:
id(object)
Return the
On 1/21/20 8:41 PM, Jon Ribbens via Python-list wrote:
Whether we call the link between 'foo' and (1, 2) a pointer or a
reference is almost entirely irrelevant, the difference is essentially
meaningless.
The issue is that in Python, objects and names are fairly distinct.
Unlike a language like
On 1/21/20, Jon Ribbens via Python-list wrote:
>
> Whether we call the link between 'foo' and (1, 2) a pointer or a
> reference is almost entirely irrelevant, the difference is essentially
> meaningless.
In programming terms, a "pointer" is always an address in memory, and,
at least to me, the te
Oh dear, I am sorry. I have created quite a storm.
Moreover, I am sorry because I misremembered what I had typed into Idle. My
original tuple only had two elements, not three, so the slicing [:2] didn't
affect the tuple at all - and so the second id() gave the same address as
the first one.
So, y
On 1/21/20 6:52 PM, Ethan Furman wrote:
> On 01/21/2020 10:55 AM, Michael Torrie wrote:
>
>> Slicing
>> returns a new object whether one is slicing a tuple, list, or a string,
>> the latter two are mutable objects.
>
> Strings are not mutable.
Yup I got my items in the wrong order. I meant to sa
On 2020-01-22 01:52, Ethan Furman wrote:
On 01/21/2020 10:55 AM, Michael Torrie wrote:
Slicing
returns a new object whether one is slicing a tuple, list, or a string,
the latter two are mutable objects.
Strings are not mutable.
In the case of tuples and strings, if the slicing encompasses th
On 01/21/2020 10:55 AM, Michael Torrie wrote:
Slicing
returns a new object whether one is slicing a tuple, list, or a string,
the latter two are mutable objects.
Strings are not mutable.
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
On 2020-01-21, Chris Angelico wrote:
> On Wed, Jan 22, 2020 at 8:01 AM Jon Ribbens via Python-list
> wrote:
>> On 2020-01-21, Chris Angelico wrote:
>> > On Wed, Jan 22, 2020 at 4:42 AM Stephen Tucker
>> > wrote:
>> >> I am left concluding that mytup is not actually a tuple (even though type
>>
On 22Jan2020 09:15, Cameron Simpson wrote:
It doesn't say anything about the contents of the internal objects:
>>> mytup = (1, [2, 3], (4, 5))
[...]
>>> mytupl[1] = [7, 8]
Traceback (most recent call last):
File "", line 1, in
NameError: name 'mytupl' is not defined
Please igno
On 21Jan2020 17:40, Stephen Tucker wrote:
I am sure this has been answered many times before, but I need to ask
it
again.
Given that the following is valid Python 2.7.10 (when keyboarded into Idle):
mytup = ("q", "w", "e")
id(mytup)
mytup = mytup [:2]
id(mytup)
and even that the first id(myt
On Wed, Jan 22, 2020 at 8:01 AM Jon Ribbens via Python-list
wrote:
>
> On 2020-01-21, Chris Angelico wrote:
> > On Wed, Jan 22, 2020 at 4:42 AM Stephen Tucker
> > wrote:
> >> I am left concluding that mytup is not actually a tuple (even though type
> >> (mytup) tells me that it is).
> >
> > If
On 2020-01-21, Chris Angelico wrote:
> On Wed, Jan 22, 2020 at 4:42 AM Stephen Tucker wrote:
>> I am left concluding that mytup is not actually a tuple (even though type
>> (mytup) tells me that it is).
>
> If type(mytup) is tuple, then mytup really truly is a tuple. There is
> no other conclusio
On Wed, Jan 22, 2020 at 5:56 AM Michael Torrie wrote:
>
> On 1/21/20 11:38 AM, Chris Angelico wrote:
> > Are you sure that it does? I can't reproduce this. When you slice the
> > first two from a tuple, you create a new tuple, and until the
> > assignment happens, both the new one and the original
On 1/21/20 11:38 AM, Chris Angelico wrote:
> Are you sure that it does? I can't reproduce this. When you slice the
> first two from a tuple, you create a new tuple, and until the
> assignment happens, both the new one and the original coexist, which
> means they MUST have unique IDs.
And furthermo
On Wed, Jan 22, 2020 at 4:42 AM Stephen Tucker wrote:
>
> Hi Python-list folk,
>
> I am sure this has been answered many times before, but I need to ask it
> again.
>
> Given that the following is valid Python 2.7.10 (when keyboarded into Idle):
>
> mytup = ("q", "w", "e")
> id(mytup)
> mytup = my
Hi Python-list folk,
I am sure this has been answered many times before, but I need to ask it
again.
Given that the following is valid Python 2.7.10 (when keyboarded into Idle):
mytup = ("q", "w", "e")
id(mytup)
mytup = mytup [:2]
id(mytup)
and even that the first id(mytup) returns the same add
m the
psycopg2.pool module documentation, "This module offers a few pure
Python classes implementing *simple* connection pooling directly in
the client application" (emphasis added). The advertised list of
features at http://initd.org/psycopg/features/ doesn't even mention
connection p
On Thu, Jun 8, 2017 at 10:47 AM, Israel Brewster wrote:
>> On Jun 7, 2017, at 10:31 PM, dieter wrote:
>>
>> israel writes:
>>> On 2017-06-06 22:53, dieter wrote:
>>> ...
>>> As such, using psycopg2's pool is essentially
>>> worthless for me (plenty of use for it, i'm sure, just not for me/my
>>>
---
Israel Brewster
Systems Analyst II
Ravn Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7293
---
> On Jun 7, 2017, at 10:31 PM, dieter wrote:
>
> israel writes:
>> On 2017-06-06 22:53
israel writes:
> On 2017-06-06 22:53, dieter wrote:
> ...
> As such, using psycopg2's pool is essentially
> worthless for me (plenty of use for it, i'm sure, just not for me/my
> use case).
Could you not simply adjust the value for the "min" parameter?
If you want at least "n" open connections, t
On 2017-06-06 22:53, dieter wrote:
israel writes:
Since I've gotten no replies to this, I was wondering if someone could
at least confirm which behavior (my expected or my observed) is
*supposed* to be the correct? Should a psycopg2 pool keep connections
open when returned to the pool (if close
israel writes:
> Since I've gotten no replies to this, I was wondering if someone could
> at least confirm which behavior (my expected or my observed) is
> *supposed* to be the correct? Should a psycopg2 pool keep connections
> open when returned to the pool (if closed is False), or should it
> cl
Since I've gotten no replies to this, I was wondering if someone could
at least confirm which behavior (my expected or my observed) is
*supposed* to be the correct? Should a psycopg2 pool keep connections
open when returned to the pool (if closed is False), or should it close
them as long as th
I've been using the psycopg2 pool class for a while now, using code similar to
the following:
>>> pool=ThreadedConnectionPool(0,5,)
>>> conn1=pool.getconn()
>>>
>>> pool.putconn(conn1)
repeat later, or perhaps "simultaneously" in a different thread.
and my understanding was that the pool l
On Fri, Mar 11, 2016 at 8:09 PM, Charles T. Smith
wrote:
> "Python deals with variables the other way around.
>They are local, if not otherwise declared.
>...
> def f():
> print(s)
> s = "I love Paris in the summer!"
> f()
> ...
> As there is no local variable
Charles T. Smith wrote:
> On Fri, 11 Mar 2016 19:29:20 +1100, Chris Angelico wrote:
>
>> Usefully? Never.
>>
>> Simple question - simple answer :)
>>
>> ChrisA
>
>
> Right, that was the expected answer as well. I just ran into that in
> legacy code, checked out the documentation and couldn't
On Fri, Mar 11, 2016 at 2:13 AM, Charles T. Smith
wrote:
> When might a "global" statement be used in the outermost level of a module?
You wouldn't need this in a normal module, because locals and globals
are the same. It may be useful if you're using exec with separate
locals and globals, and ne
On Fri, 11 Mar 2016 08:31:22 +, Mark Lawrence wrote:
> Never. Hopefully this
> http://www.python-course.eu/python3_global_vs_local_variables.php can
> explain it better than I can :)
The article is good, I'm glad to have confirmed what I have so empirical
stumbled over.
... Irrespective of t
On Fri, 11 Mar 2016 19:29:20 +1100, Chris Angelico wrote:
> Usefully? Never.
>
> Simple question - simple answer :)
>
> ChrisA
Right, that was the expected answer as well. I just ran into that in
legacy code, checked out the documentation and couldn't really make that
out. So I figured I bet
On 11/03/2016 08:13, Charles T. Smith wrote:
When might a "global" statement be used in the outermost level of a module?
Never. Hopefully this
http://www.python-course.eu/python3_global_vs_local_variables.php can
explain it better than I can :)
(whereby, I assume a module is equivalent to
On Fri, Mar 11, 2016 at 7:13 PM, Charles T. Smith
wrote:
> When might a "global" statement be used in the outermost level of a module?
>
> (whereby, I assume a module is equivalent to a python file, correct?)
>
Usefully? Never.
Simple question - simple answer :)
ChrisA
--
https://mail.python.o
When might a "global" statement be used in the outermost level of a module?
(whereby, I assume a module is equivalent to a python file, correct?)
TIA for any thoughts.
cts
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Oct 15, 2011 at 4:00 PM, Shane wrote:
> Hi,
>
> When one writes,
>
>> className='Employee'
>> baseClasses = ...
>> dictionary = { ... }
>> newClass = type( className, , dictionary)
>
> in what module does newClass belong? If it's the current module
That does seem to be the case.
> what c
Hi,
When one writes,
> className='Employee'
> baseClasses = ...
> dictionary = { ... }
> newClass = type( className, , dictionary)
in what module does newClass belong? If it's the current module what
code
do I run to print out the name of that module in a.b.c... form?
Related: If I want to make
On 2:59 PM, Bruce W. wrote:
So, this kind of notation would be different:
args[0][2]
verses args[[0][2]]
the latter is multidimensional. Can you think of example of using
this type of list?
I don't know why this had me a bit confused. I've got to get into
programming more... I had done mo
So, this kind of notation would be different:
args[0][2]
verses args[[0][2]]
the latter is multidimensional. Can you think of example of using this
type of list?
I don't know why this had me a bit confused. I've got to get into
programming more... I had done more in the past.
Bruce
Chriebe
On 9/29/2010 10:32 PM, Bruce Whealton wrote:
Would you, and could you combine a dictionary with a list in this fashion?
A python list is a mutable sequence of Python objects. Extremely mixed
example.
>>> mixed = [1, 1.0, '1', [1], (1,), {1:1}, set((1,)), list, list.append]
>>> mixed.append(m
On Wed, Sep 29, 2010 at 7:32 PM, Bruce Whealton
wrote:
> Hello all,
> I recently started learning python. I am a bit thrown by a certain
> notation that I see. I was watching a training course on lynda.com and this
> notation was not presented. For lists, when would you use what appears
Bruce Whealton wrote:
> For lists, when would
> you use what appears to be nested lists, like:
> [[], [], []]
> a list of lists?
Well, you'd use it when you'd want a list of lists ;)
There's nothing magical about a list of lists, it's just a list with
objects inside like any other, in this case
On 2010-09-30, Bruce Whealton wrote:
> Next, from the documentation I see and this is just an example (this
> kind of notation is seen elsewhere in the documentation:
> str.count(sub[, start[, end]])
> This particular example is from the string methods.
> Is this a nesting of two lists inside a
Hello all,
I recently started learning python. I am a bit thrown by a
certain notation that I see. I was watching a training course on
lynda.com and this notation was not presented. For lists, when would
you use what appears to be nested lists, like:
[[], [], []]
a list of lists?
W
On Nov 28, 12:55 pm, Erik Max Francis wrote:
> moijes12 wrote:
> > I know the value -0 is quite meaningless and makes little sense.But I
> > was just fiddling.I am unable to figure out the below result
>
> -0 and True
> > 0 --> (Why is this 0 and not say True or False)
> -0 and f
moijes12 wrote:
I know the value -0 is quite meaningless and makes little sense.But I
was just fiddling.I am unable to figure out the below result
-0 and True
0 --> (Why is this 0 and not say True or False)
-0 and false
0
-0 or True
True
Could someone please provide me some resour
In article <009b4bab$0$26925$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
> When it comes to integers, I'm not aware of any mathematical or
> programming system which treats -0 and +0 as distinct entities, even if
> they have different internal representations.
A documented feature of mo
On Sat, 28 Nov 2009 15:14:31 -0800, Mark Dickinson wrote:
>> Actually, there ARE computers where you might not see this result.
>> Virtually all of the processors on which Python runs use two's
>> complement arithmetic. In two's complement, there is no separate value
>> called -0. 0 and -0 have
On Nov 28, 11:14 pm, Mark Dickinson wrote:
> While that's true, I think the implementation of Python is
> such that the Python objects -0 and 0 should always be
> indistinguishable even on machines where the underlying
> architecture represents integers using ones' complement or
> sign-magnitude.
On Nov 28, 8:39 pm, Tim Roberts wrote:
> moijes12 wrote:
>
> >I know the value -0 is quite meaningless and makes little sense.But I
> >was just fiddling.I am unable to figure out the below result
>
> -0 and True
> >0 --> (Why is this 0 and not say True or False)
> -0 and false
>
moijes12 wrote:
>
>I know the value -0 is quite meaningless and makes little sense.But I
>was just fiddling.I am unable to figure out the below result
>
-0 and True
>0 --> (Why is this 0 and not say True or False)
-0 and false
>0
-0 or True
>True
>
>Could someone please prov
On Fri, 27 Nov 2009 23:09:06 -0800, moijes12 wrote:
> Hi
>
> I know the value -0 is quite meaningless and makes little sense.
Actually, when it comes to floating point values, it is very useful to be
able to distinguish between -0 and +0.
> But I
> was just fiddling.I am unable to figure out
On 14 Sep, 22:06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Sun, 14 Sep 2008 02:29:52 -0700 (PDT), [EMAIL PROTECTED] declaimed
> the following in comp.lang.python:
>
> > Can somebody please clarify what the shell=True does, and whether I am
> > using it correctly.
>
> What part of:
On Sun, Sep 14, 2008 at 2:29 AM, <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I generally use csh scripts for generally scripting (controlling
> simulations). Basically the script processing options, generates the
> command line, executes it and then processes the results.
>
> I would usually use the -f o
Hi,
I generally use csh scripts for generally scripting (controlling
simulations). Basically the script processing options, generates the
command line, executes it and then processes the results.
I would usually use the -f option on the shebang line to ensure that
the environment from the current
I would recommend dive into python. Its available free online (just google
it) and it tries to teach you python, not programming which unfortunately
many books try to do. It assumes that you already have some experience with
C++ or Java and contradicts python syntax/semantics to those languages. Ve
Hi Hussein,
Basically a module is a FILE and is considered as a singleton model. Yes
ur wow.py assumption is correct.
I recommend getting Mark Lutz Learning Python book to get you started.
Marcus.CM
Hussein B wrote:
Hi.
I'm a Java guy and I'm playing around Python these days...
In Java, we o
On Jul 28, 8:11 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Hussein B <[EMAIL PROTECTED]> wrote:
> > If I have a couple of modules, is there a way to package them? or
> > there is no such a thing in Python?
>
> It sounds rather as though you haven't yet gone through the Python
> tutorial. You rea
On Jul 28, 4:54 am, Hussein B <[EMAIL PROTECTED]> wrote:
> Hi.
> I'm a Java guy and I'm playing around Python these days...
> In Java, we organize our classes into packages and then jarring the
> packages into JAR files.
> What are modules in Python?
> What is the equivalent of modules in Java?
I'
Hussein B <[EMAIL PROTECTED]> wrote:
> If I have a couple of modules, is there a way to package them? or
> there is no such a thing in Python?
>
>
It sounds rather as though you haven't yet gone through the Python
tutorial. You really should read it, even if you just skim through it to
see wh
Hussein B wrote:
> Hi.
> I'm a Java guy and I'm playing around Python these days...
> In Java, we organize our classes into packages and then jarring the
> packages into JAR files.
> What are modules in Python?
> What is the equivalent of modules in Java?
Read the docs:
http://docs.python.org/tu
On Jul 28, 6:55 am, Floris Bruynooghe <[EMAIL PROTECTED]>
wrote:
> On Jul 28, 9:54 am, Hussein B <[EMAIL PROTECTED]> wrote:
>
> > Hi.
> > I'm a Java guy and I'm playing around Python these days...
> > In Java, we organize our classes into packages and then jarring the
> > packages into JAR files.
>
On Jul 28, 9:54 am, Hussein B <[EMAIL PROTECTED]> wrote:
> Hi.
> I'm a Java guy and I'm playing around Python these days...
> In Java, we organize our classes into packages and then jarring the
> packages into JAR files.
> What are modules in Python?
An importable or runable (i.e. script) collecti
Hi.
I'm a Java guy and I'm playing around Python these days...
In Java, we organize our classes into packages and then jarring the
packages into JAR files.
What are modules in Python?
What is the equivalent of modules in Java?
Please correct me if I'm wrong:
I saved my Python code under the file
[EMAIL PROTECTED] (Alex Martelli) writes:
> > turn indicates that both implementations actually work about same and
> > your "O(n squared)" argument is irrelevant.
>
> It's indeed irrelevant when the behavior _isn't_ quadratic (as in the
> case of intersections) -- but unfortunately it _is_ needle
samwyse <[EMAIL PROTECTED]> wrote:
...
> > brain:~ alex$ python -mtimeit -s'sos=[set(range(x,x+4)) for x in
> > range(0, 100, 3)]' 'r=set()' 'for x in sos: r.update(x)'
> > 10 loops, best of 3: 18.8 usec per loop
> >
> > brain:~ alex$ python -mtimeit -s'sos=[set(range(x,x+4)) for x in
> > r
Alex Martelli wrote:
> Of course, hoisting the unbound method out of the loops can afford the
> usual small optimization. But my point is that, in Python, these
> operations (like, say, the concatenation of a sequence of lists, etc)
> are best performed "in place" via loops calling mutator method
samwyse <[EMAIL PROTECTED]> wrote:
...
> Finally, does anyone familar with P3K know how best to do the reduction
> without using 'reduce'? Right now, sets don't support the 'add' and
> 'multiply' operators, so 'sum' and (the currently ficticious) 'product'
> won't work at all; while 'any' and
On 17/08/07, Beema shafreen <[EMAIL PROTECTED]> wrote:
> hi everybody,
> i have a file with data separated by tab
> mydata:
> fhl1fkh2
> dfp1chk1
> mal3alp14
> mal3moe1
> mal3spi1
> mal3bub1
> mal3bub3
> mal3mph1
> mal3mad3
> hob1nak1
> hob1wsp1
> hob1
samwyse wrote:
> Scott David Daniels wrote:
>
>> lefts = set()
>> rights = set()
>> with open('sheet1', 'r') as fh:
>> for line in fh:
>> trimmed = line.strip()
>> if trimmed: # Skip blanks (file end often looks like that)
>> left, right = line.strip()
Scott David Daniels wrote:
> lefts = set()
> rights = set()
> with open('sheet1', 'r') as fh:
> for line in fh:
> trimmed = line.strip()
> if trimmed: # Skip blanks (file end often looks like that)
> left, right = line.strip().split('\t')
>
Laurent Pointal wrote:
> Thomas Jollans a écrit :
>> On Friday 17 August 2007, Beema shafreen wrote:
>>> hi everybody,
>>> i have a file with data separated by tab
>>> mydata:
>>> fhl1fkh2
>
>>> shows these two are separated by tab represented as columns
>>> i have to check the common data bet
Laurent Pointal a écrit :
[cleaning]
fh = open('sheet1')
for line in fh:
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Jollans a écrit :
> On Friday 17 August 2007, Beema shafreen wrote:
>> hi everybody,
>> i have a file with data separated by tab
>> mydata:
>> fhl1fkh2
>> shows these two are separated by tab represented as columns
>> i have to check the common data between these two coloumn1 an coloumn
On Friday 17 August 2007, Beema shafreen wrote:
> hi everybody,
> i have a file with data separated by tab
> mydata:
> fhl1fkh2
> dfp1chk1
> mal3alp14
> mal3moe1
> mal3spi1
> mal3bub1
> mal3bub3
> mal3mph1
> mal3mad3
> hob1nak1
> hob1wsp1
> hob1rad3
>
hi everybody,
i have a file with data separated by tab
mydata:
fhl1fkh2
dfp1chk1
mal3alp14
mal3moe1
mal3spi1
mal3bub1
mal3bub3
mal3mph1
mal3mad3
hob1nak1
hob1wsp1
hob1rad3
cdr2cdc13
cdr2cdc2
shows these two are separated by tab represented as
On Aug 16, 2007, at 2:42 AM, Beema shafreen wrote:
hi every body,
i have compared two files:
code:
fh = open('HPRD_MAIN_20.txt','r')
for line in fh.readlines():
data = line.strip().split('#')
fh1 = open('NOMENCLATURE_MAIN_20.txt','r')
for line1 in fh1.readlines():
hi every body,
i have compared two files:
code:
fh = open('HPRD_MAIN_20.txt','r')
for line in fh.readlines():
data = line.strip().split('#')
fh1 = open('NOMENCLATURE_MAIN_20.txt','r')
for line1 in fh1.readlines():
data1 = line1.strip().split('#')
On May 10, 12:07 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On May 10, 8:26 am, Adam Atlas <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to figure out if there's any defined behaviour in PEP 333
> > for instances where an application returns an iterable as usual
> > without error, but that ite
On May 10, 8:26 am, Adam Atlas <[EMAIL PROTECTED]> wrote:
> I'm trying to figure out if there's any defined behaviour in PEP 333
> for instances where an application returns an iterable as usual
> without error, but that iterable's next() method eventually raises an
> exception. Since any data ther
I'm trying to figure out if there's any defined behaviour in PEP 333
for instances where an application returns an iterable as usual
without error, but that iterable's next() method eventually raises an
exception. Since any data theretofore returned by the iterable must be
assumed to have already b
Carl Banks a écrit :
> On Apr 11, 3:10 pm, "7stud" <[EMAIL PROTECTED]> wrote:
>> On Apr 11, 10:44 am, "Scott" <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>> As said before I'm new to programming, and I need in depth explaination to
>>> understand everything the way I want to know it, call it a personality
Hamilton, William a écrit :
>> -Original Message-
>> From: [EMAIL PROTECTED]
> [mailto:python-
>> [EMAIL PROTECTED] On Behalf Of Scott
>>
>> I understand all that. What I don't understand is why all the
>> documentation
>> I see says, "When removing a specific element from a list using pop
Carl Banks wrote:
> On Apr 11, 3:10 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> > On Apr 11, 10:44 am, "Scott" <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > As said before I'm new to programming, and I need in depth explaination to
> > > understand everything the way I want to know it, call it a person
On Apr 11, 3:10 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> On Apr 11, 10:44 am, "Scott" <[EMAIL PROTECTED]> wrote:
>
>
>
> > As said before I'm new to programming, and I need in depth explaination to
> > understand everything the way I want to know it, call it a personality quirk
> > ;p.
>
> > With p
On Apr 11, 10:44 am, "Scott" <[EMAIL PROTECTED]> wrote:
> As said before I'm new to programming, and I need in depth explaination to
> understand everything the way I want to know it, call it a personality quirk
> ;p.
>
> With pop() you remove the last element of a list and return its value:
>
> No
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Scott
>
> I understand all that. What I don't understand is why all the
> documentation
> I see says, "When removing a specific element from a list using pop()
it
> must be in this format: list
Scott a écrit :
> As said before I'm new to programming, and I need in depth explaination to
> understand everything the way I want to know it, call it a personality quirk
> ;p.
>
> With pop() you remove the last element of a list and return its value:
>
> Now I know list is a bad name, but for
Scott wrote:
> Now I know list is a bad name, but for the sake of arguement lets assume its
> not a built in sequence>
It's easier to use another name, than writing all that parragraph, ;)
> I understand all that. What I don't understand is why all the documentation
> I see says, "When remov
On 4/11/07, Scott <[EMAIL PROTECTED]> wrote:
> I see says, "When removing a specific element from a list using pop() it
> must be in this format: list.pop([i]).
The tutorial (http://docs.python.org/tut/node7.html) says the following:
pop( [i] )
Remove the item at the given position in the lis
As said before I'm new to programming, and I need in depth explaination to
understand everything the way I want to know it, call it a personality quirk
;p.
With pop() you remove the last element of a list and return its value:
Now I know list is a bad name, but for the sake of arguement lets as
On 2007-01-05 03:46, tubby wrote:
> Is this the safest, most portable way to open files on any platform:
>
> fp = open(file_name, 'rb')
> fp.close()
>
> I understand that doing the following on Windows to a binary file (a
> jpeg or exe files for example) can cause file corruption, is that correct?
At Thursday 4/1/2007 23:46, tubby wrote:
I understand that doing the following on Windows to a binary file (a
jpeg or exe files for example) can cause file corruption, is that correct?
fp = open(file_name, 'r')
fp.close()
How can a simple open in read mode corrupt data???
You can't corrupt *
Does a py script written to open and read binary files on Windows affect
files on a Linux or Mac machine in a negative way? My concern is
portability and safety. I want scripts written within Windows to work
equally well on Linux and Mac computers.
Is this the safest, most portable way to open
Hi John,
> 1. Your directory/package hierarchy is far too complicated. Flatten it.
Ok.
> 2. You have circular references: the others module will import from
> utils, but utils wants to import from others. This is prima facie
> evidence that your modules are not structured properly
Yes, that's wh
Tool69 wrote:
> Hi,
> I've got the following hierarchy:
>
> mainprog/
> __init__.py
> prog.py
> utils/
> __init__.py
> myutils.py
> others/
> __init__.py
> myothers.py
>
> Inside prog.py I need to have full access to myutils.py and
> myothers.py;
> I
Hi,
I've got the following hierarchy:
mainprog/
__init__.py
prog.py
utils/
__init__.py
myutils.py
others/
__init__.py
myothers.py
Inside prog.py I need to have full access to myutils.py and
myothers.py;
Inside myutils.py, I need to access two classe
1 - 100 of 107 matches
Mail list logo