piterrr.dolin...@gmail.com wrote:
> You see, Javascript, for one, behaves the same way as Python (no variable
> declaration) but JS has curly braces and you know the variable you have
> just used is limited in scope to the code within the { }. With Python, you
> have to search the whole file.
I d
Hala Gamal wrote:
> thank you :)it worked well for small file but when i enter big file,, i
> obtain this error: "Traceback (most recent call last):
> File "D:\Python27\yarab (4).py", line 46, in
> writer.add_document(**doc)
> File "build\bdist.win32\egg\whoosh\filedb\filewriting.py", lin
On Sat, Feb 23, 2013 at 10:37 AM, Michael Torrie wrote:
> On 02/22/2013 02:49 PM, Monte Milanuk wrote:
>> Web2py does seem pretty attractive in that it seems to come with a lot
>> of functionality rolled in already. It seems to be pretty easy to
>> deploy... since this would be more of a case whe
I created an html help page for my Python 2.7.3 application and put it in a
documentation folder. I used webbrowser.open() to fetch the page.
On linux -- KDE specifically, the command opens the local file on my default
browser with no issues. However, on Windows 7, it opens Internet Explorer,
On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>
> I created an html help page for my Python 2.7.3 application and put it in
a documentation folder. I used webbrowser.open() to fetch the page.
>
> On linux -- KDE specifically, the command opens the local file on my
default browser with no issues.
Rather than using a relative path, try using
webbrowser.open('{}/documentation/help.html'.format(os.path.dirname(__file__))).
On Sun, Feb 24, 2013 at 1:17 AM, llanitedave wrote:
> I created an html help page for my Python 2.7.3 application and put it in a
> documentation folder. I used webbrows
On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>
> I created an html help page for my Python 2.7.3 application and put it in
a documentation folder. I used webbrowser.open() to fetch the page.
>
> On linux -- KDE specifically, the command opens the local file on my
default browser with no issues.
On Mon, Feb 25, 2013 at 1:16 AM, Steven D'Aprano wrote:
> On 24/02/13 23:59, Chris Angelico wrote:
>>
>> On Sun, Feb 24, 2013 at 10:25 PM, Larry Hastings
>> wrote:
>>>
>>> Or
>>>
>>> command, subcommand = next(iterargs), next(iterargs)
>>
>>
>> Err is there a language guarantee of the or
On 24/02/2013 04:20, Larry Hudson wrote:
On 02/23/2013 03:46 PM, piterrr.dolin...@gmail.com wrote:
Hi all,
... I have discovered today there is no do...while type loop. [Sigh]
No biggie. This is easily simulated with:
while True:
...
if :
break
Less easily simulated i
> My concern is that using postgres or mysql for this would be akin to
> using a sledgehammer to swat a fly,
I wouldn't use MySQL for anything that requires anything else than
"select".
And PostgreSQL has extremely spartanic resource requirements in the
default configuration. It runs on Linux on
> As far as doing client/server stuff with just a database engine,
> unless you have tight control over the environment end to end, from a
> security pov, it's not a good idea to expose the database engine
> itself to the internet. Better to put a restricted web services API
> in front of it that
On 2013-02-25 01:19, Chris Angelico wrote:
> >>> command, subcommand = next(iterargs), next(iterargs)
> >>
> >>
> >> Err is there a language guarantee of the order of evaluation
> >> in a tuple, or is this just a "CPython happens to evaluate
> >> independent expressions left-to-right"? Thi
On Mon, Feb 25, 2013 at 1:44 AM, Tim Chase
wrote:
> On 2013-02-25 01:19, Chris Angelico wrote:
>> >>> command, subcommand = next(iterargs), next(iterargs)
>> >>
>> >>
>> >> Err is there a language guarantee of the order of evaluation
>> >> in a tuple, or is this just a "CPython happens to
On Mon, Feb 25, 2013 at 1:31 AM, Wolfgang Keller wrote:
>> As far as doing client/server stuff with just a database engine,
>> unless you have tight control over the environment end to end, from a
>> security pov, it's not a good idea to expose the database engine
>> itself to the internet. Bette
Hi guys,
Question. Have this code
intX = 32 # decl + init int var
intX_asString = None # decl + init with NULL string var
intX_asString = intX.__str__ ()# convert int to string
What are these ugly underscores for? _str__
On Mon, Feb 25, 2013 at 2:46 AM, wrote:
> Hi guys,
>
> Question. Have this code
>
> intX = 32 # decl + init int var
> intX_asString = None # decl + init with NULL string var
>
> intX_asString = intX.__str__ ()# convert int to string
>
> What are these ug
Terry Reedy udel.edu> writes:
>
> On 2/22/2013 4:35 AM, Wolfgang Maier wrote:
> > Dear all,
> > I am wondering what the rules are that determine whether a built-in type is
> > subclassable or not.
> > As examples, why can you base your classes on int or set,
> > but not on bool or range?
> > Als
In article ,
Chris Angelico wrote:
> The "dunder" methods ("d"ouble "under"score, leading and trailing),
> also called "magic methods", are the implementations of various
> special features. For instance, indexing foo[1] is implemented using
> the __getitem__ method. Here's a list:
>
> http://d
On 02/24/2013 07:46 AM, piterrr.dolin...@gmail.com wrote:> Hi guys,
Question. Have this code
intX = 32 # decl + init int var
intX_asString = None # decl + init with NULL string var
intX_asString = intX.__str__ ()# convert int to string
What are these
> The complete list of types classes that *cannot* be subclassed is:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> of these range, memoryview, slice and bool are the only ones in builtins.
I am sorry,
but again I forgot to say which Python version I'm referring to:
I used Python 3.3 :)
Ha
On 22/02/2013 21:37, piterrr.dolin...@gmail.com wrote:
if (some statement):# short form
rather than
if (some statement == true):# long form
What all those ugly brackets are for?
Peter
--
Cheers.
Mark Lawrence
--
http://mail.python.org/mailman/listinfo/python-list
On 02/24/2013 09:23 AM, Ethan Furman wrote:
> On 02/24/2013 07:46 AM, piterrr.dolin...@gmail.com wrote:> Hi guys,
>>
>> Question. Have this code
>>
>> intX = 32 # decl + init int var
>> intX_asString = None # decl + init with NULL string var
>>
>> intX_asStrin
On Saturday, February 23, 2013 02:50:43 PM Rex Macey wrote:
> Here is one general and one specific question about creating GUIs using
> tkinter from a newbie. I have created a class in which to hold some data.
> I want to create a GUI to get the data from the user and store it in the
> object. B
On Sun, 24 Feb 2013 07:46:07 -0800, piterrr.dolinski wrote:
> Hi guys,
>
> Question. Have this code
>
> intX = 32 # decl + init int var
> intX_asString = None # decl + init with NULL string var
>
> intX_asString = intX.__str__ ()# convert int to string
Hi!
The subject is a segment of a sentence which I copied from Python's
official homepage. In whole, it reads:
"The urlopen() and urlretrieve() functions can cause arbitrarily long
delays while waiting for a network connection to be set up. This means
that it is difficult to build an interacti
On 02/24/2013 10:37 AM, Dennis Lee Bieber wrote:
> Decided to look up the VAX/VMS scheme...
>
> """
> If you know the condition code for a message, you can use F$MESSAGE to
> translate the code to its associated message. For example:
> $ WRITE SYS$OUTPUT F$MESSAGE(%X0001)
> %SYSTEM-S-NOR
On 02/24/2013 12:29 PM, Michael Torrie wrote:
> I think he's maintaining existing code. It's unfortunate that his first
> exposure to python is code written by someone else in such a poor style,
> and in a way that definitely isn't pythonic. No wonder he's struggling
> to like python! Though I'
In article ,
Michael Torrie wrote:
> It's interesting to note that Windows NT sort of descends from VMS.
More than "sort of". Dave Cutler was the chief architect of both.
--
http://mail.python.org/mailman/listinfo/python-list
On 2013-02-23, Chris Angelico wrote:
> It's worth noting, though, that there are self-perpetuating aspects to
> it. I can happily distribute a .py file to a Linux audience, because
> many Linux distros come with a Python already installed, or at very
> least can grab one easily via the package ma
On Sun, 24 Feb 2013 13:09:56 -0500, Mitya Sirenef wrote:
> On 02/24/2013 12:29 PM, Michael Torrie wrote:
> > Another way to explain the double underscore methods is that they are
> > how things like operator overloading is performed. Want to make a
> > class that you can use the [index] notati
On 02/24/2013 09:29 AM, Michael Torrie wrote:
On 02/24/2013 09:23 AM, Ethan Furman wrote:
On 02/24/2013 07:46 AM, piterrr.dolin...@gmail.com wrote:> Hi guys,
Question. Have this code
intX = 32 # decl + init int var
intX_asString = None # decl + init with
On 02/24/2013 01:23 PM, Steven D'Aprano wrote:
On Sun, 24 Feb 2013 13:09:56 -0500, Mitya Sirenef wrote:
>
>> On 02/24/2013 12:29 PM, Michael Torrie wrote:
>
>> > Another way to explain the double underscore methods is that they are
>> > how things like operator overloading is performed. Want to
In article ,
Ethan Furman wrote:
> On the bright side, if this is one of his 2000 line scripts, he should be
> able to get it down
> to at least half that once he has a good feel for Python and re-writes it.
I hope he doesn't get paid by the line :-)
--
http://mail.python.org/mailman/listinfo
On Sun, Feb 24, 2013 at 10:48 AM, 7segment <7segm...@live.com> wrote:
> Hi!
>
> The subject is a segment of a sentence which I copied from Python's
> official homepage. In whole, it reads:
>
> "The urlopen() and urlretrieve() functions can cause arbitrarily long
> delays while waiting for a network
On 2013-02-24 18:55, Ian Kelly wrote:
On Sun, Feb 24, 2013 at 10:48 AM, 7segment <7segm...@live.com> wrote:
Hi!
The subject is a segment of a sentence which I copied from Python's
official homepage. In whole, it reads:
"The urlopen() and urlretrieve() functions can cause arbitrarily long
delay
On Sun, 24 Feb 2013 11:55:09 -0700, Ian Kelly wrote:
> On Sun, Feb 24, 2013 at 10:48 AM, 7segment <7segm...@live.com> wrote:
>> Hi!
>>
>> The subject is a segment of a sentence which I copied from Python's
>> official homepage. In whole, it reads:
>>
>> "The urlopen() and urlretrieve() functions c
On Sun, 24 Feb 2013 19:04:28 +, MRAB wrote:
> On 2013-02-24 18:55, Ian Kelly wrote:
>> On Sun, Feb 24, 2013 at 10:48 AM, 7segment <7segm...@live.com> wrote:
>>> Hi!
>>>
>>> The subject is a segment of a sentence which I copied from Python's
>>> official homepage. In whole, it reads:
>>>
>>> "T
On 23 fév, 15:26, Devin Jeanpierre wrote:
> Hi folks,
>
> I'm pretty unsure of myself when it comes to unicode. As I understand
> it, you're generally supposed to compare things in a case insensitive
> manner by case folding, right? So instead of a.lower() == b.lower()
> (the ASCII way), you do a.
> To demonstrate that the person who wrote this code was not a good Python
>
> programmer. I hope it wasn't you :-) This person obviously had a very
>
> basic, and confused, understanding of Python.
>
>
>
> And, quite frankly, was probably not a very good programmer of *any*
>
> language:
> > if (some statement):# short form
> >
> > rather than
> >
> > if (some statement == true):# long form
>
>
> What all those ugly brackets are for?
>
Mark,
Back in the day when C was king, or take many newer long established languages
(C#, Java), the use of () has bee
On 02/24/2013 02:40 PM, piterrr.dolin...@gmail.com wrote:
if (some statement): # short form
>>>
>>> rather than
>>>
>>> if (some statement == true): # long form
>>
>>
>> What all those ugly brackets are for?
>>
>
> Mark,
>
> Back in the day when C was king, or take many newer long established
>
On Mon, Feb 25, 2013 at 5:19 AM, Grant Edwards wrote:
> On 2013-02-23, Chris Angelico wrote:
>
>> It's worth noting, though, that there are self-perpetuating aspects to
>> it. I can happily distribute a .py file to a Linux audience, because
>> many Linux distros come with a Python already install
On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
> On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>
> >
>
> > I created an html help page for my Python 2.7.3 application and put it in a
> > documentation folder. I used webbrowser.open() to fetch the page.
>
> >
>
> > On linu
On Sun, 24 Feb 2013 20:40:05 +0100, wrote:
> if (some statement): # short form
>
> rather than
>
> if (some statement == true): # long form
What all those ugly brackets are for?
Mark,
Back in the day when C was king, or take many newer long established
languages (C#,
On 2013-02-24 19:40, piterrr.dolin...@gmail.com wrote:
if (some statement):# short form
rather than
if (some statement == true):# long form
What all those ugly brackets are for?
Mark,
Back in the day when C was king, or take many newer long established
languages (C#, Java
On Mon, Feb 25, 2013 at 7:34 AM, MRAB wrote:
> Some languages require parentheses, others don't.
>
> C does. C++, Java and C# are descended from, or influenced by, C.
>
> Algol didn't (doesn't?). Pascal, Modula-2, Oberon, Ada, and others
> don't.
>
> Parentheses are used where required, but not us
On 24/02/2013 19:40, piterrr.dolin...@gmail.com wrote:
if (some statement):# short form
rather than
if (some statement == true):# long form
What all those ugly brackets are for?
Mark,
Back in the day when C was king, or take many newer long established languages (C#,
Jav
On 02/24/2013 11:40 AM, piterrr.dolin...@gmail.com wrote:
Back in the day when C was king, or take many newer long established languages (C#,
Java), the use of () has been widespread and mandated by the compilers. I have never
heard anyone moan about the requirement to use parentheses. Now come
On 24/02/2013 20:28, llanitedave wrote:
On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
I created an html help page for my Python 2.7.3 application and put it in a
documentation folder. I used webbrowser.open() to fetch th
On Mon, Feb 25, 2013 at 7:34 AM, Ethan Furman wrote:
> One of the things I love about Python is its ability to get out of the way
> and let me work:
>
> - no variable declarations, just use 'em
> - no type declarations, just use 'em
> - no need to remember what's an object and what's not --
On Sun, Feb 24, 2013 at 12:28 PM, llanitedave wrote:
> On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
>> On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>> > I created an html help page for my Python 2.7.3 application and put it in
>> > a documentation folder. I used webbrowse
On Sunday, February 24, 2013 12:48:40 PM UTC-8, Chris Rebert wrote:
> On Sun, Feb 24, 2013 at 12:28 PM, llanitedave wrote:
>
> > On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
>
> >> On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>
> >> > I created an html help page for my P
In article ,
Chris Angelico wrote:
> On Mon, Feb 25, 2013 at 7:34 AM, MRAB wrote:
> > Some languages require parentheses, others don't.
> >
> > C does. C++, Java and C# are descended from, or influenced by, C.
> >
> > Algol didn't (doesn't?). Pascal, Modula-2, Oberon, Ada, and others
> > don't.
On Sunday, February 24, 2013 12:50:02 PM UTC-8, Mark Lawrence wrote:
> On 24/02/2013 20:28, llanitedave wrote:
>
> > On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
>
> >> On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>
> >>
>
> >>>
>
> >>
>
> >>> I created an html help pa
In article ,
Chris Angelico wrote:
> > no need to remember what's an object and what's not -- everything is an
> > object
Well, not quite everything. If I write:
if foo:
do_this()
and_this()
the code block making up the body of the "if" statement is not an
object. In some languages,
Am 24.02.2013 20:27 schrieb 7segment:
When in doubt, check some other way, such as with a browser.
Thank you Ian. Browser is not a good idea, because I need this tool to
work automatically. I don't have time to check and compare the response
times manually and put them into the database.
Of
On 24 February 2013 19:29, wrote:
> Hi. Steve, I don't know where you have been over the past couple of days
> but it is widely known (if the thread title is any indication) that I am
> indeed very new to Python, but not new to programming in general.
>
> To give a bit of background where I found
On 24 February 2013 20:48, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
> > On Mon, Feb 25, 2013 at 7:34 AM, MRAB
> wrote:
> > > Some languages require parentheses, others don't.
> > >
> > > C does. C++, Java and C# are descended from, or influenced by, C.
> > >
> > > Algol didn't
On Mon, Feb 25, 2013 at 8:35 AM, Joshua Landau
wrote:
> def solve_quadratic(a, b, c):
> """Solve a quadratic equation of the form ax² + bx + c = 0
>
> The result will be a tuple of the two results; the results can be equal if
> the determinant is 0.
> This supports imaginary results for if the det
On 2013-02-24 20:28, llanitedave wrote:
On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
[snip]
Sounds like this might be your problem:
http://bugs.python.org/issue8936
The fix would seem to be ensuring that the URL you pass includes
the scheme (in your case, "file:").
Hol
On 02/24/2013 04:44 PM, Chris Angelico wrote:
On Mon, Feb 25, 2013 at 8:08 AM, Roy Smith wrote:
>> In article ,
>> Chris Angelico wrote:
>>
no need to remember what's an object and what's not -- everything
is an
object
>
> Careful on the citations - Ethan Furman said that, I just
On 02/24/2013 12:58 PM, Chris Angelico wrote:
On Mon, Feb 25, 2013 at 7:34 AM, Ethan Furman wrote:
- no variable declarations, just use 'em
Variable declarations can go either way; Python requires you to name
all globals that you mutate
I'm not sure what you mean -- example?
--
~Ethan~
Josh,
Not thank you for your malicious post.
I think you are missing the point here.
My source code was just a dummy to offer context for the question I wanted to
ask. Further down the line, if I ever feel I don't need to pseudo-declare
variables I will stop doing it. But for the moment I am tr
On 02/24/2013 10:46 AM, piterrr.dolin...@gmail.com wrote:
Hi guys,
Question. Have this code
intX = 32 # decl + init int var
intX_asString = None # decl + init with NULL string var
None is not a str, and it's not a "NULL string var" Perhaps what you
wa
On Sun, Feb 24, 2013 at 5:43 PM, wrote:
> Josh,
>
> Not thank you for your malicious post.
> I think you are missing the point here.
>
> My source code was just a dummy to offer context for the question I wanted
> to ask. Further down the line, if I ever feel I don't need to
> pseudo-declare vari
Motorola RAZR HD
http://www.youtube.com/watch?v=u28AjcMah0o
--
http://mail.python.org/mailman/listinfo/python-list
On 24 February 2013 22:43, wrote:
> Josh,
>
> Not thank you for your malicious post.
>
Be careful, us programmers do *eventually* catch on to who is a troll, and
if you say things like that we may eventually mark you off as just to
hostile.
I *honestly* meant no malice or insult. If you can't ta
On 24 February 2013 22:08, Chris Angelico wrote:
> On Mon, Feb 25, 2013 at 8:35 AM, Joshua Landau
> wrote:
> > def solve_quadratic(a, b, c):
> > """Solve a quadratic equation of the form ax² + bx + c = 0
> >
> > The result will be a tuple of the two results; the results can be equal
> if
> > the
On 24 February 2013 23:18, Oscar Benjamin wrote:
> On 24 February 2013 21:35, Joshua Landau
> wrote:
> >
> > determinant = b**2 - 4*a*c
>
> It's called the discriminant. A determinant is something altogether
> different.
*cries at own idiocy*
Thank you.
--
http://mail.python.org/mailman/listi
> Most of what gets hung in art galleries these days is far less
> visually pleasing than well-written code.
+1 QOTW
--
http://mail.python.org/mailman/listinfo/python-list
>> intX = 32 # decl + init int var
> How is it not obvious that "intX" is an integer *without* the comment?
Indeed the assignment is enough to deduce "intX" is an int. The comment is
there to let me know it is unlikely intX appears earlier in the code. Please,
let me do
On Mon, Feb 25, 2013 at 9:33 AM, Ethan Furman wrote:
> On 02/24/2013 12:58 PM, Chris Angelico wrote:
>>
>> On Mon, Feb 25, 2013 at 7:34 AM, Ethan Furman wrote:
>>>
>>>
>>>- no variable declarations, just use 'em
>>
>>
>> Variable declarations can go either way; Python requires you to name
>>
On Mon, Feb 25, 2013 at 10:38 AM, wrote:
>
>>> intX = 32 # decl + init int var
>> How is it not obvious that "intX" is an integer *without* the comment?
>
> Indeed the assignment is enough to deduce "intX" is an int. The comment is
> there to let me know it is unlikely i
For the record, I completely misread and misunderstood the question. I
should stop posting that late at night :P
On Sun, Feb 24, 2013 at 1:25 AM, Demian Brecht wrote:
> Rather than using a relative path, try using
> webbrowser.open('{}/documentation/help.html'.format(os.path.dirname(__file__))).
On 02/24/2013 03:38 PM, piterrr.dolin...@gmail.com wrote:
intX = 32 # decl + init int var
How is it not obvious that "intX" is an integer *without* the comment?
Indeed the assignment is enough to deduce "intX" is an int. The comment is
there to let me know it is unl
I'm trying to write a simple script to scrape
http://www.vudu.com/movies/#tag/99centOfTheDay/99c%20Rental%20of%20the%20day
in order to send myself an email every day of the 99c movie of the day.
However, using a simple command like (in Python 3.0):
urllib.request.urlopen('http://www.vudu.com/mo
> For example (I believe it's already been mentioned) "declaring" intX with
> some integer value does *nothing* to maintain
>
> X as an integer:
>
> --> intX = 32
>
> --> intX = intX / 3.0
>
> --> intX
>
> 10.66
>
Yes I did see that it is possible to redefine the type of a variable
On Sunday, February 24, 2013, Adam W. wrote:
> I'm trying to write a simple script to scrape
> http://www.vudu.com/movies/#tag/99centOfTheDay/99c%20Rental%20of%20the%20day
>
> in order to send myself an email every day of the 99c movie of the day.
>
> However, using a simple command like (in Pytho
On 02/24/2013 07:02 PM, Adam W. wrote:
I'm trying to write a simple script to scrape
http://www.vudu.com/movies/#tag/99centOfTheDay/99c%20Rental%20of%20the%20day
in order to send myself an email every day of the 99c movie of the day.
However, using a simple command like (in Python 3.0):
urllib
On 25 February 2013 00:08, wrote:
> > For example (I believe it's already been mentioned) "declaring" intX
> with some integer value does *nothing* to maintain
> >
> > X as an integer:
> >
> > --> intX = 32
> >
> > --> intX = intX / 3.0
> >
> > --> intX
> >
> > 10.66
> >
>
> Yes I did see
On 25/02/2013 00:08, piterrr.dolin...@gmail.com wrote:
For example (I believe it's already been mentioned) "declaring" intX with some
integer value does *nothing* to maintain
X as an integer:
--> intX = 32
--> intX = intX / 3.0
--> intX
10.66
Yes I did see that it is possible to
Hi folks,
When I am trying to understand "yield" expression in Python2.6, I did the
following coding. I have difficulty understanding why "val" will be "None" ?
What's happening under the hood? It seems to me very time the counter resumes
to execute, it will assign "count" to "val", so "val" sho
Hi folks,
When I am trying to understand "yield" expression in Python2.6, I did the
following coding. I have difficulty understanding why "val" will be "None" ?
What's happening under the hood? It seems to me very time the counter resumes
to execute, it will assign "count" to "val", so "val" sho
On 02/24/2013 04:08 PM, piterrr.dolin...@gmail.com wrote:
For example (I believe it's already been mentioned) "declaring" intX with some
integer value does *nothing* to maintain
X as an integer:
--> intX = 32
--> intX = intX / 3.0
--> intX
10.66
Yes I did see that it is possible
On Sun, 24 Feb 2013 16:08:01 -0500, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> > no need to remember what's an object and what's not -- everything is
>> > an object
>
> Well, not quite everything. If I write:
>
> if foo:
>do_this()
>and_this()
>
> the code block ma
In article ,
Ethan Furman wrote:
> On 02/24/2013 03:38 PM, piterrr.dolin...@gmail.com wrote:
> >
> >>> intX = 32 # decl + init int var
> >> How is it not obvious that "intX" is an integer *without* the comment?
> >
> > Indeed the assignment is enough to deduce "intX" is
On 25 February 2013 00:39, Ziliang Chen wrote:
> Hi folks,
> When I am trying to understand "yield" expression in Python2.6, I did the
> following coding. I have difficulty understanding why "val" will be "None" ?
> What's happening under the hood? It seems to me very time the counter resumes
>
Hi folks,
When I am trying to understand "yield" expression in Python2.6, I did the
following coding. I have difficulty understanding why "val" will be "None" ?
What's happening under the hood? It seems to me very time the counter resumes
to execute, it will assign "count" to "val", so "val" sho
On 25 February 2013 00:08, wrote:
Chris Angelico wrote:
>> For example (I believe it's already been mentioned) "declaring" intX with
>> some integer value does *nothing* to maintain
>>
>> X as an integer:
>>
>> --> intX = 32
>>
>> --> intX = intX / 3.0
>>
>> --> intX
>>
>> 10.66
>>
>
> Y
In article ,
piterrr.dolin...@gmail.com wrote:
> Yes I did see that it is possible to redefine the type of a variable. But I
> don't think I would ever do this intentionally
One does not need language features to protect themselves against things
they do intentionally. They need language feat
On Monday, February 25, 2013 8:51:28 AM UTC+8, Oscar Benjamin wrote:
> On 25 February 2013 00:39, Ziliang Chen wrote:
>
> > Hi folks,
>
> > When I am trying to understand "yield" expression in Python2.6, I did the
> > following coding. I have difficulty understanding why "val" will be "None"
>
On Sun, 24 Feb 2013 11:40:05 -0800, piterrr.dolinski wrote:
>> > if (some statement): # short form
>> >
>> > rather than
>> >
>> > if (some statement == true): # long form
>>
>>
>> What all those ugly brackets are for?
>>
>>
> Mark,
>
> Back in the day when C was king, or
On Sunday, February 24, 2013 2:15:10 PM UTC-8, MRAB wrote:
> On 2013-02-24 20:28, llanitedave wrote:
>
> > On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
>
> [snip]
>
> >> Sounds like this might be your problem:
>
> >>
>
> >> http://bugs.python.org/issue8936
>
> >>
>
> >>
On Sun, 24 Feb 2013 16:08:06 -0800, piterrr.dolinski wrote:
>> For example (I believe it's already been mentioned) "declaring" intX
>> with some integer value does *nothing* to maintain
>>
>> X as an integer:
>>
>> --> intX = 32
>>
>> --> intX = intX / 3.0
>>
>> --> intX
>>
>> 10.66
>
On Sun, 24 Feb 2013 17:40:54 -0500, Mitya Sirenef wrote:
> But if block doesn't have to be inside a function, right? It needs to be
> inside a module, but then again everything is inside a module, but it
> wouldn't be very object-oriented if the module was the only object in
> Python :-).
Python
On Sunday, February 24, 2013 7:30:00 PM UTC-5, Dave Angel wrote:
> On 02/24/2013 07:02 PM, Adam W. wrote:
>
> > I'm trying to write a simple script to scrape
> > http://www.vudu.com/movies/#tag/99centOfTheDay/99c%20Rental%20of%20the%20day
>
> >
>
> > in order to send myself an email every day o
On Mon, Feb 25, 2013 at 11:45 AM, Oscar Benjamin
wrote:
> On 25 February 2013 00:08, wrote:
> Chris Angelico wrote:
>>> For example (I believe it's already been mentioned) "declaring" intX with
>>> some integer value does *nothing* to maintain
>>>
>>> X as an integer:
>>>
>>> --> intX = 32
>>>
On Mon, Feb 25, 2013 at 12:04 PM, Steven D'Aprano
wrote:
> Not at all. The only difference is whether you get a compiler error or a
> runtime error. Instead of:
>
> 10 Write code.
> 20 Compile.
> 30 If compiler error, GO TO 10.
> 40 REM code compiles, but it still needs to be tested
> 50 Test code
On Sunday, February 24, 2013 7:27:54 PM UTC-5, Chris Rebert wrote:
> On Sunday, February 24, 2013, Adam W. wrote:
> I'm trying to write a simple script to scrape
> http://www.vudu.com/movies/#tag/99centOfTheDay/99c%20Rental%20of%20the%20day
>
>
>
>
> in order to send myself an email every day
On 02/24/2013 03:40 PM, Mitya Sirenef wrote:
> But if block doesn't have to be inside a function, right? It needs
> to be inside a module, but then again everything is inside a module, but
> it wouldn't be very object-oriented if the module was the only object in
> Python :-).
A module indeed fits
1 - 100 of 122 matches
Mail list logo