Alan Gauld writes:
> On 11/12/14 23:15, Ben Finney wrote:
>
> >> *array = json.load( { "name": "Joe", "address": "111 Street" } )*
> >
> > You are passing a Python dict value to the function. JSON is a
> > serialisation
, until then, switch to a
better client program.
--
\ “To punish me for my contempt of authority, Fate has made me an |
`\ authority myself.” —Albert Einstein, 1930-09-18 |
_o__)
hours of 9 and 11 a.m. daily.” —hotel, Athens |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ou, and to everyone here good cheer.
--
\ “If consumers even know there's a DRM, what it is, and how it |
`\ works, we've already failed.” —Peter Lee, Disney corporation, |
_o__) 2005 |
Ben Finney
__
Alex Kleider writes:
> On 2014-12-25 16:59, Ben Finney wrote:
>
> > http://sscce.org/>.
>
> It may be that this link will go away.
> http://www.coderanch.com/t/628405/Ranch-Office/SSCCE-org-document-disappearing
Almost certainly at some future time, but not because o
to, the collection.
--
\“Laurie got offended that I used the word ‘puke’. But to me, |
`\ that's what her dinner tasted like.” —Jack Handey |
_o__) |
Ben Finney
___
Tutor
t makes them secure from their customers.” —Cory |
_o__) Doctorow, 2014-02-05 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
nappropriate for religion to play any role in issues of state |
_o__)[of] a modern democracy.” —Lawrence M. Krauss, 2012-05-28 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python
yeah, |
`\ Brain, but where are we going to find rubber pants our size?” |
_o__) —_Pinky and The Brain_ |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
fast acting relief, try slowing down.” —Jane Wagner, via |
`\ Lily Tomlin |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Ben Finney writes:
> I would consider it good practice to have a copyright statement and a
> grant of license at the top; a handful of lines should suffice.
> […]
> But none of that belongs in the docstring.
>
> […]
> There is PEP 257 https://www.python.org/dev/peps/pep-0
—Richard Buckminster Fuller, _Critical Path_, 1981 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
g me because I'm gay.” |
_o__) —postsecret.com, 2010-01-19 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
it does mystify me that otherwise intelligent people take |
_o__) it seriously.” —Douglas Adams |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
oever procures |
`\it at the expense of ten thousand desires makes a wise and |
_o__) happy purchase.” —J. Balguy |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
p.lang.python’. So it is evident that your needs are already met :-)
--
\“[R]ightful liberty is unobstructed action, according to our |
`\will, within limits drawn around us by the equal rights of |
_o__) others.” —Thomas Jefferson, 1819 |
Ben Finney
ake code more
elegant and readable. They might seem a little magic for now if you
haven't learned about them yet, but this is a good demonstration of
the improvement they can make.
--
\ “… one of the main causes of the fall of the Roman Empire was |
`\ that, l
in programming Python.
--
\ “For fast acting relief, try slowing down.” —Jane Wagner, via |
`\ Lily Tomlin |
_o__) |
Ben Finney
___
in time.” —Steven Wright |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
doing this?
--
\ “I never forget a face, but in your case I'll be glad to make |
`\ an exception.” —Groucho Marx |
_o__) |
Ben Finney
___
several serialisation / persistence tools.
https://docs.python.org/3/library/persistence.html>
--
\ “Software patents provide one more means of controlling access |
`\ to information. They are the tool of choice for the internet |
_o__) highwayma
as I am about fairies and the |
`\ Flying Spaghetti Monster.” —Richard Dawkins, 2006-10-13 |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or chang
t |
_o__) goes downhill from there.” —Will Larson, 2008-11-04 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
(Since this has moved beyond “tutor” material, I'm redirecting to the
‘python-list’ forum; anyone interested, please follow up there.)
Steven D'Aprano writes:
> On Fri, Mar 20, 2015 at 09:09:16AM +1100, Ben Finney wrote:
>
> > Use a page break (the U+000C FORM FEED) whit
long.
So, those classes should be named ‘Actor’, ‘Movie’, ‘Series’.
--
\ “I thought I'd begin by reading a poem by Shakespeare, but then |
`\ I thought ‘Why should I? He never reads any of mine.’” —Spike |
_o__)
an is not a state.… a state must have people. There |
`\are no Vaticanians.… No-one gets born in the Vatican except by |
_o__)an unfortunate accident.” —Geoffrey Robertson, 2010-09-18 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsu
stakes which can be |
`\ made in a very narrow field.” —Niels Bohr |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail
e the author is right |
`\ there, in the room talking to you, which is why I don't like to |
_o__) read good books.” —Jack Handey |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
`\ But it does mystify me that otherwise intelligent people take |
_o__)it seriously.” —Douglas Adams |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.
Laura Creighton writes:
> In a message of Sun, 12 Apr 2015 18:05:16 +1000, Ben Finney writes:
> >Please disable that in order to receive individual messages, so you
> >can participate properly: responding to individual messages that the
> >rest of us see.
>
> Or se
s.
Chaining long strings of operations together in a single statement goes
directly against that principle, and hence is to be avoided.
--
\ “[T]he speed of response of the internet will re-introduce us |
`\to that from which our political systems have separated us for |
_o_
keeping
the attribution lines matching the quoted material helps to make sense
of it all.
--
\ “The long-term solution to mountains of waste is not more |
`\ landfill sites but fewer shopping centres.” —Clive Hamilton, |
_o__)
o, and try to see what you're seeing
when you do it – then we may be able to help.
--
\ “To have the choice between proprietary software packages, is |
`\ being able to choose your master. Freedom means not having a |
_o__)master.” —Richard M. Stallman, 2
Frustration_, H. G. Wells, 1936 |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
—_Pinky and The Brain_ |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Phil writes:
> Thank you Ben and Martin for your detailed replies. I was debating
> whether or not to post my question at all because it looked vague,
> even to me.
That's not the issue; the question was posed clearly enough. The problem
is that your purpose is opaque, and we
the status quo, |
`\ or die trying. Either is better than actually WORKING for a |
_o__) living.” —ringsnake.livejournal.com, 2007-11-12 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
nities discussing how to do it.
--
\ “I distrust those people who know so well what God wants them |
`\to do to their fellows, because it always coincides with their |
_o__) own desires.” —Susan Brownell Anthony, 1896 |
Ben Finney
_
Wright |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ill tired from the move. Day 2: Everybody |
_o__) talks to me like I'm an idiot.’” —Steven Wright |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
that
easy.
--
\ “Now Maggie, I’ll be watching you too, in case God is busy |
`\ creating tornadoes or not existing.” —Homer, _The Simpsons_ |
_o__) |
Ben Finney
___
Tutor
ld quickly cease to become stranger than fiction, |
`\ once we got as used to it.” —Henry L. Mencken |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
T
Profundis_, 1897 |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
_Money: Whence It |
_o__) Came, Where It Went_, 1975 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
t block as small as possible.
Better than learning the idiom independently later on, and cramming half
their program into that block :-/
--
\“But it is permissible to make a judgment after you have |
`\examined the evidence. In some circles it is even encouraged.” |
_o__)
ne 1
def foo(lorem, /, ipsum):
^
SyntaxError: invalid syntax
--
\ “Ignorance more frequently begets confidence than does |
`\ knowledge.” —Charles Darwin, _The Descent of Man_, 1871 |
_o__)
that, the definition is
unlikely to help because it's making distinctions below the level you're
used to thinking about.
Did the Wikipedia article help?
> In summary, and Ben will correct me if I'm wrong, a daemon is a
> computer program that runs as a background task.
That
st Law of Technology |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
e know that ain't so.” —Artemus Ward |
_o__) (1834–1867), U.S. journalist |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
rary Distutils. But not today.
--
\ “Nothing is more sacred than the facts.” —Sam Harris, _The End |
`\ of Faith_, 2004 |
_o__) |
Ben Finney
___
to be nurtured by delusion.” |
_o__) —Sam Harris, at _Beyond Belief 2006_ |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
“In the long run, the utility of all non-Free software |
`\ approaches zero. All non-Free software is a dead end.” —Mark |
_o__)Pilgrim, 2006 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ignorant.” —Shaun Mason |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ach "if" until the
> problem became glaringly obvious.
>
> BTW, it isn't good to write tests like:
>
> if theo == True:
>
> "theo" a Boolean anyway. Just say:
>
> if theo:
>
> It reads more naturally as well.
>
> Cheers,
> Came
f you always want the latest and greatest, then you have to |
`\ buy a new iPod at least once a year.” —Steve Jobs, MSNBC |
_o__) interview 2006-05-25 |
Ben Finney
___
Tutor maillist - Tutor@python.
u're not |
`\aiming high enough.” —Alan Kay |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription o
car in a tow-away zone. When I came back |
`\ the entire area was missing.” —Steven Wright |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subsc
y
https://docs.python.org/3/glossary.html> can help with questions
like this.
--
\ “Not using Microsoft products is like being a non-smoker 40 or |
`\ 50 years ago: You can choose not to smoke, yourself, but it's |
_o__) hard to avoid second-hand sm
So I have to make a fibonacci sequence, and I'm not sure what is wrong with
my code
#This program illustrates the fibonacci sequence
nterms=int(input("Please enter how many terms you would like to know: "))
n1 = 1
n2 = 1
count = 0
if nterms <= 0:
print("Please enter a positive integer")
elif nterms
I need to write code that runs a cost calculating program with many
different variables and I honestly don't understand it, my code is:
beefmeals=int(input("Enter number of beef meals: "))
shitmeals=int(input("Enter number of vegan meals: "))
party=beefmeals+shitmeals
print(party)
if party<=50
a=7
dar/days/>
--
\ “I went to San Francisco. I found someone's heart.” —Steven |
`\Wright |
_o__) |
Ben Finney
__
Hi,
When installing Python on a windows server, will the server require a
restart?
Thank you!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Initial Mystery that attends any journey is: how did the |
`\ traveller reach his starting point in the first place?” —Louise |
_o__) Bogan, _Journey Around My Room_ |
Ben Finney
___
Tutor maillist - Tutor@pyt
e for details” is notifying the reader without
over-burdening them every time they open the file.
--
\ “Theology is the effort to explain the unknowable in terms of |
`\ the not worth knowing.” —Henry L. Mencken |
_o__)
dgement.
--
\ “An expert is a man who has made all the mistakes which can be |
`\ made in a very narrow field.” —Niels Bohr |
_o__) |
Ben Finney
___
Tutor mai
Hi I'm new to Python and I would like to know how he deals with memory
space.
I thought I had understood but I made a test and the results were
uncoherenent with my understanding, here is the thing:
>>> a=[1,2]
>>> l=[a,a]
>>> id(a); id(l[0]); id(l[1]);
61659528
61659528
61659528
>>> #All Have the
s.read_sql` function to read data from a SQL
database into a pandas dataframe, which you then can manipulate:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql.html
Good luck!
--
Ben Hancock
https://elwha1.github.io
___
Tuto
301 - 367 of 367 matches
Mail list logo