Etextbook 978-0134379760 The Practice of Computing Using Python (3rd Edition) 2024 Scribd Download
Etextbook 978-0134379760 The Practice of Computing Using Python (3rd Edition) 2024 Scribd Download
https://ebookmass.com
https://ebookmass.com/product/etextbook-978-
0134379760-the-practice-of-computing-using-
python-3rd-edition/
https://ebookmass.com/product/introduction-to-computing-and-problem-
solving-using-python-1st-edition-e-balaguruswamy/
testbankdeal.com
https://ebookmass.com/product/bayesian-optimization-theory-and-
practice-using-python-1st-edition-peng-liu/
testbankdeal.com
https://ebookmass.com/product/introduction-to-computing-using-python-
an-application-development-focus-2nd-edition-ebook-pdf-version/
testbankdeal.com
https://ebookmass.com/product/bayesian-optimization-theory-and-
practice-using-python-peng-liu/
testbankdeal.com
eTextbook 978-1111531102 Ethics in a Computing Culture
(Advanced Topics)
https://ebookmass.com/product/etextbook-978-1111531102-ethics-in-a-
computing-culture-advanced-topics/
testbankdeal.com
https://ebookmass.com/product/etextbook-978-0134173054-statistics-for-
managers-using-microsoft-excel/
testbankdeal.com
https://ebookmass.com/product/etextbook-978-9351500827-discovering-
statistics-using-ibm-spss-statistics-4th-edition/
testbankdeal.com
https://ebookmass.com/product/etextbook-978-1305263727-theory-and-
practice-of-counseling-and-psychotherapy/
testbankdeal.com
https://ebookmass.com/product/quantum-computing-by-practice-python-
programming-in-the-cloud-with-qiskit-and-ibm-q-vladimir-silva/
testbankdeal.com
THE PRACTICE OF COMPUTING USING
3RD EDITION
WILLIAM RICHARD
PUNCH • ENBODY
C O N T E N T S
•
VIDEONOTES xxiv
PREFACE xxv
PREFACE TO THE SECOND EDITION xxix
1.0.1 Data Manipulation xxx
1.0.2 Problem Solving and Case Studies xxx
1.0.3 Code Examples xxx
1.0.4 Interactive Sessions xxxi
1.0.5 Exercises and Programming Projects xxxi
1.0.6 Self-Test Exercises xxxi
1.0.7 Programming Tips xxxi
vii
viii CONTENTS
P A R T 2 S TA RT I N G T O P R O G R A M 35
Chapter 1 Beginnings 37
1.1 Practice, Practice, Practice 37
1.2 QuickStart, the Circumference Program 38
1.2.1 Examining the Code 40
1.3 An Interactive Session 42
1.4 Parts of a Program 43
1.4.1 Modules 43
1.4.2 Statements and Expressions 43
1.4.3 Whitespace 45
1.4.4 Comments 46
1.4.5 Special Python Elements: Tokens 46
1.4.6 Naming Objects 48
1.4.7 Recommendations on Naming 49
1.5 Variables 49
1.5.1 Variable Creation and Assignment 50
1.6 Objects and Types 53
1.6.1 Numbers 55
1.6.2 Other Built-In Types 57
1.6.3 Object Types: Not Variable Types 58
1.6.4 Constructing New Values 60
CONTENTS ix
1.7 Operators 61
1.7.1 Integer Operators 61
1.7.2 Floating-Point Operators 64
1.7.3 Mixed Operations 64
1.7.4 Order of Operations and Parentheses 65
1.7.5 Augmented Assignment Operators: A Shortcut! 66
1.8 Your First Module, Math 68
1.9 Developing an Algorithm 69
1.9.1 New Rule—Testing 73
1.10 Visual Vignette: Turtle Graphics 74
1.11 What’s Wrong with My Code? 75
Chapter 2 Control 87
2.1 QuickStart Control 87
2.1.1 Selection 87
2.1.2 Booleans for Decisions 89
2.1.3 The if Statement 89
2.1.4 Example: What Lead Is Safe in Basketball? 92
2.1.5 Repetition 96
2.1.6 Example: Finding Perfect Numbers 100
2.1.7 Example: Classifying Numbers 105
2.2 In-Depth Control 109
2.2.1 True and False: Booleans 109
2.2.2 Boolean Variables 110
2.2.3 Relational Operators 110
2.2.4 Boolean Operators 115
2.2.5 Precedence 116
2.2.6 Boolean Operators Example 117
2.2.7 Another Word on Assignments 120
2.2.8 The Selection Statement for Decisions 122
2.2.9 More on Python Decision Statements 122
2.2.10 Repetition: the while Statement 126
2.2.11 Sentinel Loop 136
2.2.12 Summary of Repetition 136
2.2.13 More on the for Statement 137
2.2.14 Nesting 140
2.2.15 Hailstone Sequence Example 142
2.3 Visual Vignette: Plotting Data with Pylab 143
2.3.1 First Plot and Using a List 144
2.3.2 More Interesting Plot: A Sine Wave 145
x CONTENTS
P A R T 3 D AT A S T R U C T U R E S A N D F U N C T I O N S 187
Chapter 4 Working with Strings 189
4.1 The String Type 190
4.1.1 The Triple-Quote String 190
4.1.2 Nonprinting Characters 191
4.1.3 String Representation 191
4.1.4 Strings as a Sequence 192
4.1.5 More Indexing and Slicing 193
4.1.6 Strings Are Iterable 198
CONTENTS xi
P A R T 4 C L A S S E S , M A K I N G Y O U R O W N D AT A S T R U C T U R E S
AND ALGORITHMS 527
Chapter 11 Introduction to Classes 529
11.1 QuickStart: Simple Student Class 529
11.2 Object-Oriented Programming 530
11.2.1 Python Is Object-Oriented! 530
11.2.2 Characteristics of OOP 531
11.3 Working with OOP 531
11.3.1 Class and Instance 531
11.4 Working with Classes and Instances 532
11.4.1 Built-In Class and Instance 532
11.4.2 Our First Class 534
11.4.3 Changing Attributes 536
11.4.4 The Special Relationship Between an Instance and
Class: instance-of 537
11.5 Object Methods 540
11.5.1 Using Object Methods 540
11.5.2 Writing Methods 541
11.5.3 The Special Argument self 542
11.5.4 Methods Are the Interface to a Class Instance 544
11.6 Fitting into the Python Class Model 545
11.6.1 Making Programmer-Defined Classes 545
11.6.2 A Student Class 545
11.6.3 Python Standard Methods 546
11.6.4 Now There Are Three: Class Designer, Programmer,
and User 550
11.7 Example: Point Class 551
11.7.1 Construction 553
11.7.2 Distance 553
11.7.3 Summing Two Points 553
11.7.4 Improving the Point Class 554
11.8 Python and OOP 558
11.8.1 Encapsulation 558
11.8.2 Inheritance 559
11.8.3 Polymorphism 559
11.9 Python and Other OOP Languages 559
11.9.1 Public versus Private 559
11.9.2 Indicating Privacy Using Double Underscores (__) 560
CONTENTS xvii
APPENDICES 753
Appendix A Getting and Using Python 753
A.1 About Python 753
A.1.1 History 753
A.1.2 Python 3 753
A.1.3 Python Is Free and Portable 754
A.1.4 Installing Anaconda 756
A.1.5 Starting Our Python IDE: Spyder 756
A.1.6 Working with Python 757
A.1.7 Making a Program 760
A.2 The IPython Console 762
A.2.1 Anatomy of an iPython Session 763
A.2.2 Your Top Three iPython Tips 764
A.2.3 Completion and the Tab Key 764
A.2.4 The ? Character 766
A.2.5 More iPython Tips 766
A.3 Some Conventions for This Book 769
A.3.1 Interactive Code 770
A.3.2 Program: Written Code 770
A.3.3 Combined Program and Output 770
A.4 Summary 771
Appendix B Simple Drawing with Turtle Graphics 773
B.0.1 What Is a Turtle? 773
B.0.2 Motion 775
B.0.3 Drawing 775
B.0.4 Color 777
B.0.5 Drawing with Color 779
B.0.6 Other Commands 781
B.1 Tidbits 783
B.1.1 Reset/Close the Turtle Window 783
Appendix C What’s Wrong with My Code? 785
C.1 It’s Your Fault! 785
C.1.1 Kinds of Errors 785
C.1.2 “Bugs” and Debugging 787
C.2 Debugging 789
C.2.1 Testing for Correctness 789
C.2.2 Probes 789
C.2.3 Debugging with Spyder Example 1 789
C.2.4 Debugging Example 1 Using print() 793
CONTENTS xxi
xxiv
P R E F A C E
•
A FIRST COURSE IN COMPUTER SCIENCE IS ABOUT A NEW WAY OF SOLVING PROBLEMS
computationally. Our goal is that after the course, students when presented with a problem
will think, “Hey, I can write a program to do that!”
The teaching of problem solving is inexorably intertwined with the computer language
used. Thus, the choice of language for this first course is very important. We have cho-
sen Python as the introductory language for beginning programming students—majors and
non-majors alike—based on our combined 55 years of experience teaching undergradu-
ate introductory computer science at Michigan State University. Having taught the course
in Pascal, C/C++, and now Python, we know that an introductory programming language
should have two characteristics. First, it should be relatively simple to learn. Python’s sim-
plicity, powerful built-in data structures, and advanced control constructs allow students to
focus more on problem solving and less on language issues. Second, it should be practical.
Python supports learning not only fundamental programming issues such as typical pro-
gramming constructs, a fundamental object-oriented approach, common data structures,
and so on, but also more complex computing issues such as threads and regular expres-
sions. Finally, Python is “industrial strength” forming the backbone of companies such as
YouTube, DropBox, Industrial Light and Magic, and many others.
We emphasize both the fundamental issues of programming and practicality by focus-
ing on data manipulation and analysis as a theme—allowing students to work on real prob-
lems using either publicly available data sets from various Internet sources or self-generated
data sets from their own work and interests. We also emphasize the development of pro-
grams, providing multiple, worked out, examples, and three entire chapters for detailed de-
sign and implementation of programs. As part of this one-semester course, our students
have analyzed breast cancer data, catalogued movie actor relationships, predicted disrup-
tions of satellites from solar storms, and completed many other data analysis problems. We
have also found that concepts learned in a Python CS1 course transitioned to a CS2 C++
course with little or no impact on either the class material or the students.
xxv
Random documents with unrelated
content Scribd suggests to you:
The Fool’s Paradise
I HAVE just added another famous dog to my list. It was a good list
before, but it is now richer. It included Matthew Arnold’s Geist and Max
and Kaiser, George Meredith’s Islet, Cowper’s Beau, Newton’s
Diamond, Mrs. Browning’s Flush, Mr. Lehmann’s Rufus, all Dr. John
Brown’s many friends, Scott’s deerhounds, Mortimer Collins’s St.
Bernards, Pope’s spaniel. I remember only these as I write, but of
course there are many others. And to this company enters now
“Pomero.”
Landor’s “Pomero” came to him late in life—in the early ’forties—by
which time the old man—he was then nearing seventy but had twenty
fairly stormy years left—had settled again in England, his wife and
family and most of his sympathies being far away in Italy. At Bath he
then lived, making occasional visits to Gore House, and varying the
composition of exquisite prose and tender felicitous verse with quarrels
and tempests and tempests and reconciliations and tempests and
lawsuits. Such then was the possessor of “Pomero”—or, as he would
probably have called himself, the proud possession of “Pomero”—of
whom such glimpses as I have had come to me in scraps of letters
quoted by Forster in his Life of this noble, troubled, impossible,
glorious creature.
Here is one, written by Landor at Warwick, when away from home,
or what stood for home at that period—1844. Pomero had only just
arrived from Fiesole; and it is worth remarking that had Landor lived to-
day no such fortune would ever have been his, for never would he
have survived such explosions of rage as the modern six months’
quarantine for imported dogs would have brought on him. (Think of him
expressing his views to the custom-house officer at Dover!) “Daily,” he
wrote, “do I think of Bath and Pomero. I fancy him lying on the narrow
window-sill, and watching the good people go to church. He has not
yet made up his mind between the Anglican and Roman Catholic; but I
hope he will continue in the faith of his forefathers, if it will make him
happier.”
Pomero, I should say, was a Pomeranian; but let me quote Sir
Sidney Colvin’s charming sentences upon both man and dog. “With
‘Pomero’ Landor would prattle in English and Italian as affectionately
as a mother with a child. Pomero was his darling, the wisest and most
beautiful of his race; Pomero had the brightest eyes and the most
wonderful yaller tail ever seen. Sometimes it was Landor’s humour to
quote Pomero in speech and writing as a kind of sagacious elder
brother whose opinion had to be consulted on all subjects before he
would deliver his own. This creature accompanied his master wherever
he went, barking ‘not fiercely but familiarly’ at friend and stranger, and
when they came in would either station himself upon his master’s head
to watch the people passing in the street, or else lie curled up in his
basket until Landor, in talk with some visitor, began to laugh, and his
laugh to grow and grow, when Pomero would spring up and leap upon
and fume about him, barking and screaming for sympathy until the
whole street resounded. The two together, master and dog, were for
years to be encountered daily on their walks about Bath and its vicinity,
and there are many who perfectly well remember them; the majestic
old man, looking not a whit the less impressive for his rusty and dusty
brown suit, his bulging boots, his rumpled linen, or his battered hat;
and his noisy, soft-haired, quick-glancing, inseparable companion.”
Landseer, one feels, should have painted them: Dignity and
Fidelity, Unreason and Understanding, Lion and Pomeranian. Since he
did not, we must go to Forster’s extracts from the letters to fill in the
picture. Another passage, also in 1844: “Pomero was on my knee
when your letter came. He is now looking out of the window; a sad
male gossip, as I often tell him. I dare not take him with me to London.
He would most certainly be stolen, and I would rather lose Ipsley or
Llanthony. The people of the house love him like a child, and declare
he is as sensible as a Christian. He not only is as sensible, but much
more Christian than some of those who have lately brought strife and
contention into the Church.”
Again: “Pomero is sitting in a state of contemplation, with his nose
before the fire. He twinkles his ears and his feathery tail at your
salutation. He now licks his lips and turns round, which means ‘Return
mine.’ The easterly wind has an evident effect upon his nerves. Last
evening I took him to hear Luisina de Sodre play and sing. She is my
friend the Countess de Molande’s granddaughter and daughter of De
Sodre, Minister of Brazil to the Pope a few years ago. Pomero was
deeply affected, and lay close to the pedal on her gown, singing in a
great variety of tones, not always in time. It is unfortunate that he
always will take a part where there is music, for he sings even worse
than I do.”
So far the letters have been to Forster. Here is a passage from one
to Landor’s sisters, also in 1844: “Let me congratulate you on the
accident that deprives you of your carriage-horses. Next to servants,
horses are the greatest trouble in life. Dogs are blessings, true
blessings. Pomero, who sends his love, is the comfort of my solitude
and the delight of my life. He is quite a public character here in Bath.
Everybody knows him and salutes him. He barks aloud at all familiarly,
not fiercely. He takes equal liberties with his fellow-creatures, if indeed
dogs are more his fellow-creatures than I am. I think it was St. Francis
de Sales who called birds and quadrupeds his sisters and brothers.
Few saints have been so good-tempered, and not many so wise.”
For twelve years Pomero lived to make his master (his servant)
happy or less unhappy, and then he died. That is the tragic thing—the
brief life of these loyal devotees. It is not right, not fair, that so much
love and energy should so quickly pass away. Many sensitive persons
refuse for this reason to keep dogs at all. That, I think, is going too far,
but I can understand it. Life at its longest for a human being is so brief
and so fraught with disappointment and disillusion that, at least, one
feels, the span of the most faithful and satisfying friends that man
knows might have been made commensurate.... Pomero, as I have
said, was Landor’s for twelve years, and then he died. Writing to
Forster on the 10th of March, 1856, the old man—he was eighty-one—
tells the news: “Pomero, dear Pomero, died this evening at about four
o’clock. I have been able to think of nothing else....”
A few days later he wrote again: “Everybody in this house grieves
for Pomero. The cat lies day and night upon his grave, and I will not
disturb the kind creature, though I want to plant some violets upon it,
and to have his epitaph placed around his little urn:—
O urna! nunquam sis tuo eruta hortulo:
Cor intus est fidele, nam cor est canis.
Vale, hortule! aeternumque, Pomero! vale.
Sed, si datur, nostri memor.”
Eighty-one though he was, Landor had still nine years before him
—years of trouble, and fury, and exile. Not till 1864 did he meet
Pomero again.
Pomero had been Landor’s confidant and delight for five years
when, in 1849, there came to one of the most illustrious of his
contemporaries—and a critic of the world not less impatient than
himself, but how different!—a similar companion. It was not, it is true, a
Pomeranian, but a dog none the less.
The news was thus broken by one of the most remarkable women
of all time to, as it happens, the same friend who had been first told of
the arrival of Pomero. “O Lord!” she writes, wilfully, characteristically as
ever, “O Lord! I forgot to tell you I have got a little dog, and Mr. C. has
accepted it with an amiability! To be sure, when he comes down
gloomy in the morning, or comes in wearied from his walk, the
infatuated little beast dances round him on his hind legs as I ought to
do and can’t; and he feels flattered and surprised by such unwonted
capers to his honour and glory.” So wrote Jane Welsh Carlyle to John
Forster, on the 11th of December, 1849.
Sixteen years later the writer of that letter died suddenly in her
carriage in Hyde Park, and thus ended a life of heroic vivacity. Her
husband, deprived for ever of the power of sustained work, difficult
enough when he had her service and intelligence within call, spent a
few months in his early bereavement in collecting and arranging and
annotating her marvellous correspondence; and one does not envy
him his feelings as he did it. Coming to the note to Forster which I have
quoted, he thus introduced it: “Poor little Nero, the dog, must have
come this winter, or ‘Fall’ (1849)? Railway guard (from Dilberoglue,
Manchester) brought him in one evening late. A little Cuban (Maltese?
and otherwise mongrel) shock, mostly white—a most affectionate,
lively little dog, otherwise of small merit, and little or no training. Much
innocent sport there arose out of him; much quizzical ingenuous
preparation of me for admitting of him: ‘My dear, it’s borne in upon my
mind that I’m to have a dog,’ etc., etc., and with such a look and style!
We had many walks together, he and I, for the next ten years; a great
deal of small traffic, poor little animal, so loyal, so loving, so naïve and
true with what of dim intellect he had! Once, perhaps in his third year
here, he came pattering upstairs to my garret; scratched duly, was let
in, and brought me (literally) the ‘gift of a horse’ (which I had talked of
needing)! Brought me, to wit, a letter hung to his neck, inclosing on a
saddler’s card the picture of a horse, and adjoined to it a cheque for
£50—full half of some poor legacy which had fallen to her! Can I ever
forget such a thing? I was not slave enough to take the money; and got
a horse next year, on the common terms—but all Potosi, and the
diggings new and old, had not in them, as I now feel, so rich a gift!”
These three volumes of Mrs. Carlyle’s indomitably gay
correspondence, laughing at her crosses, making light of her
disappointments, extracting whatever of merriment or sunshine was
possible, and never with any trace of self-commendation or
consciousness of heroism: and a woman too who must have known
that, given a fair chance, which she never had, she would have shone
in her own way with hardly less brilliancy than her bear; who must have
known she was worth petting, and considering, and adoring rightly—
these three volumes of brilliant good-humour against odds, with the
dour, intolerant, solitary widower re-living the irrecoverable past as he
read them over and edited them, counting his lost opportunities on
every page, are surely as tragic a work as literature knows. But Nero is
pawing at the desk. The note continues: “Poor Nero’s last good days
were with us at Aberdour, in 1859. Twice or thrice I flung him into the
sea there, which he didn’t at all like; and in consequence of which he
even ceased to follow me at bathing time, the very strongest measure
he could take—or pretend to take. For two or three mornings
accordingly I had seen nothing of Nero, but the third or fourth morning,
on striking out to swim a few yards, I heard gradually a kind of
swashing behind me; looking back, it was Nero out on voluntary
humble partnership—ready to swim with me to Edinburgh, or to the
world’s end, if I liked.”
Pomero, as I said, lived for twelve years with his whirlwind adorer.
Nero had a shorter life with that strange Scotch couple only by a few
months. This is the end of Carlyle’s note: “Fife had done his mistress,
and still more him, a great deal of good. But, alas, in Cook’s grounds
here, within a month or two a butcher’s cart (in her very sight) ran over
him neck and lungs: all winter he wheezed and suffered; ‘Feb. 1st,
1860,’ he died (prussic acid, and the doctor obliged at last!). I could not
have believed my grief then and since would have been the twentieth
part of what it was—nay, that the want of him would have been to me
other than a riddance. Our last midnight walk together (for he insisted
on trying to come), Jan. 31st, is still painful to my thought. ‘Little dim,
white speck, of Life, of Love, Fidelity, and Feeling, girdled by the
Darkness as of Night Eternal!’ Her tears were passionate and bitter,
but repressed themselves, as was fit, I think, the first day. Top of the
garden, by her direction, Nero was put under ground. A small stone
tablet with date she also got, which, broken by careless servants, is
still there—a little protected now.”
It is there still, but few visitors to that gloomy Chelsea house,
where two geniuses, a man and woman, failed sufficiently to subdue
and blend their individualities for so many years, ever walk down the
garden to see it. Underneath are the remains of one who could neither
read nor write nor frame systems, but who lived the only successful life
of the three.
An American Hero
HAD it not been for the trenchant pen of his cousin, Anthony Ashley
Cooper, the first Lord Shaftesbury, we should know nothing of Mr.
Hastings; but as it happens, a portrait of Mr. Hastings being painted,
the Earl was amused to pit his pen against the brush of the artist and
append the result to the picture. So that Mr. Hastings used to hang on
the wall at Wimborne St. Giles’s, near Cranbourn, in Dorset (one of the
Shaftesbury seats), doubly limned. Where he is to-day I know not; but
the Earl’s words remain and are accessible. I take them in the form
which follows from the “Connoisseur” for Thursday, 14 August, 1755,
and I may in passing say that in turning over the leaves of this leisurely
little breakfast-table companion it was not a little disquieting to think
what good papers they had in London one hundred and fifty-six years
ago, before the days of amalgamation.
As to the portrait of Mr. Hastings, I have seen an engraving of it in
one of Hutchins’s Dorsetshire books, and it is a crude enough thing—a
little odd old man, with a pointed beard, sharp eyes, and a long staff in
his right hand—not so much a patriarch’s staff as a surveyor’s pole.
Nothing in it to suggest that he loved spaniels, for example, or knew
the best thing to do with a disused pulpit. Yet he did.
Now for the shrewd and cryptic statesman who first made the
admirable remark (since given to others) that “Wise men are of but one
religion,” adding to the lady who inquired what that was, “Wise men
never tell.” He begins thus: “In the year 1638 lived Mr. Hastings; by his
quality son, brother, and uncle to the Earls of Huntingdon. He was ...
low, very strong, and very active; of a reddish flaxen hair. His clothes
always green cloth, and never all worth (when new) five pounds. His
house was perfectly of the old fashion, in the midst of a large Park well
stocked with deer; and near the house rabbits to serve his kitchen;
many fish-ponds; great store of wood and timber; a bowling-green in it,
long but narrow, full of high ridges, it being never levell’d since it was
plough’d. They used round sand bowls; and it had a banqueting house
like a stand, built in a tree.”—The mansion no longer stands in its
entirety. It was pulled down, with the exception of two wings, at the
beginning of the last century. One of these wings, however, contains
the kitchen, and gives ample evidence of the hospitality which, as we
shall see, was practised there.
Mr. Hastings “kept all manner of sport hounds, that ran buck, fox,
hare, otter, and badger. And hawks, long and short winged. He had all
sorts of nets for fish. He had a walk in the New Forest, and the manor
of Christ Church. This last supplied him with red deer, sea and river
fish. And indeed all his neighbours’ grounds and royalties were free to
him, who bestowed all his time on these sports, but what he borrowed
to caress his neighbours’ wives and daughters; there being not a
woman in all his walks, of the degree of a yeoman’s wife or under, and
under the age of forty, but it was extremely her fault if he was not
intimately acquainted with her. This made him very popular; always
speaking kindly to the husband, father, or brother, who was, to boot,
very welcome to his house whenever he came.” (“Popular” is a good
word, so good, in this connexion, that one has to pause a little to
savour it.) Thinking of him thus occupied, if ever, you would say, an old,
whimsical bachelor was portrayed, he is portrayed here. But you would
be wrong, for Mr. Hastings was married. It was his wife who brought
him Woodlands, and she did not die till 1638, when he was eighty-
seven. They had, moreover, a son. Lord Shaftesbury, who was
something of a cynic, suppressed this detail. It amused him to
eliminate Mrs. Hastings.
His lordship goes on to describe the free-and-easy (and, on the
face of it, wifeless) character of Mr. Hastings’ house. “A house not so
neatly kept as to shame him or his dirty shoes: the great hall strow’d
with marrow bones, full of hawks’ perches, hounds, spaniels, and
terriers; the upper side of the hall hung with foxskins of this and the last
year’s killing; here and there a polecat intermixt; game-keepers’ and
hunters’ poles in great abundance. The parlour was a large room as
properly furnished. On a great hearth paved with brick lay some
terriers, and the choicest hounds and spaniels. Seldom but two of the
great chairs had litters of young cats in them, which were not to be
disturbed, he having always three or four attending him at dinner, and
a little white stick of fourteen inches lying by his trencher, that he might
defend such meat as he had no mind to part with to them.” (One does
not feel much room for a Mrs. Hastings here. She kept her own
quarters, I imagine.)
I should like to see a picture of old Mr. Hastings at his meals—with
all his animals about him and his hand holding his little white stick.
Steinlen, who designed that fine poster for Nestlé’s milk—the cats
clamouring for the little girl’s breakfast—could draw the animals; but for
the little old gentleman, with his red hair and green clothes and great
age, you would want a Dendy Sadler or Stacy Marks.
The description of the house continues: “The windows (which were
very large) served for places to lay his arrows, cross-bows, stone-
bows, and other such like accoutrements. The corners of the room full
of the best-chose hunting and hawking poles. An oyster table at the
lower end, which was of constant use twice a day all the year round,
for he never failed to eat oysters, before dinner and supper, through all
seasons; the neighbouring town of Poole supply’d him with them. The
upper part of the room had two small tables and a desk, on the one
side of which was a Church Bible, and on the other the Book of
Martyrs. On the tables were hawks’ hoods, bells, and such like; two or
three old green hats, with their crowns thrust in so as to hold ten or a
dozen eggs, which were of a pheasant kind of poultry, he took much
care of and fed himself. Tables, dice, cards, and boxes were not
wanting. In the hole of the desk were store of tobacco-pipes that had
been used.”—Mr. Hastings must have been one of the earliest of the
smokers, since he was born as far back as 1551.
“On one side of this end of the room was the door of a closet
wherein stood the strong beer and the wine, which never came thence
but in single glasses, that being the rule of the house exactly observ’d.
For he never exceeded in drink or permitted it.” In another account of
Mr. Hastings his iron rule with regard to liquor was suggested to have
caused much unhappiness to his guests. And I must admit that there
seems to be something wrong in a house where you may not see the
bottle, much less handle it. But, on the other hand, it is such
unexpected whims and unreasonableness that are the life-blood of
these old originals. Any dull creature can be reasonable.
Now comes a priceless touch: “On the other side was the door into
an old chapel, not used for devotion. The pulpit, as the safest place,
was never wanting of a cold chine of beef, venison pasty, gammon of
bacon, or great apple pye, with thick crust, extremely baked.” “Never
wanting” is splendid. One longs to know more of the service of this
house—of the cook who fell in so complacently with such a master’s
needs and ways. “Never wanting!”
Like Bishop Corbet’s fairies, Mr. Hastings was of the old
profession. “His table cost him not much, though it was good to eat at.
His sports supplied all but beef and mutton, except Fridays, when he
had the best salt fish (as well as other fish) he could get; and was the
day his neighbours of best quality most visited him. He never wanted a
London pudding, and always sung it in with ‘My part lies therein-a.’”
“He always sung it in.” Here lies an old custom indeed, dead, I
suppose, as Mr. Hastings himself and all his spaniels and kittens. Who
sings in a pudding to-day? And, indeed, what pudding is worth singing
in? Not the rice which I had yesterday, at any rate.
And so we come to the end: “He was well-natured but soon
angry.... He lived to be a hundred; never lost his eyesight, but always
wrote and read without spectacles; and got on horseback without help.
Until past four score he rode to the death of a stag as well as any.” He
was buried in Horton church in 1650 at the age of ninety and nine, and
England will never know anything like him again. Gone are such
spacious days and ways; gone such idiosyncrasy and humour. Only, I
imagine, on the bowling-greens are Mr. Hastings’ characteristics to be
still observed; for our old devotees of that leisurely contest, that most
pacific warfare, cannot in their attitudes, gestures and expressions
differ much from the Squire of Woodlands. Just so did he, three
hundred years ago, contort and twist his frame, as he watched his
bowl’s career and bent every nerve and fibre to influence it to swerve
at the last dying moment on the jack between his two rivals. These
elemental anxieties do not change.
Thoughts on Tan
IN my search for the curious, which I hope that nothing will ever
satiate, I came recently upon this advertisement at the end of a not too
respectable comic paper:—
When I read it first I laughed. Then I cut it out. Then I began not to
laugh; and I am not sure now that one ought not to weep....
We were considering earlier in this volume a certain kind of fool’s
paradise—the paradise which surrounds the collector-fool who
genuinely believes his geese to be swans. That amiable simpleton
deceived no one; he was merely soothingly and caressingly self-
deceived to the top of his bent through a heaven-sent want of true
taste. Compared with him the man who deliberately rubs a mixture on
his face in order to induce his friends to believe that he has been much
in the sun when he has not is complex indeed—for he is deceiving
every one else without for an instant deceiving himself at all. For that is
my reading of that advertisement. I do not accept its face value; I do
not believe that it is bought by men in order to render themselves more
attractive to the fair. My reading is that it is bought by men (and
perhaps by women too: you observe the testimony of the Society
Lady?) in order that it may lend colour to their assertion that they have
been fashionably or expensively holiday-making when they have not.
But why pretend? you say. Ah! you are perhaps well-to-do. Nothing
keeps you at home; or even if it did, it would not cause you shame. But
can you not believe that there are others?...
We feel that we are greater than we know
—as Wordsworth says. That is an exalted mood. A commoner
experience would perhaps be expressed thus:—
We hope you’ll think us greater than we are.
That aspiration, at any rate, is at the bottom of the success of such a
lotion as this; and it is prevalent.
A full inquiry into this foible of poor human nature would need a
volume; nor could I carry it out. Something of the minute scientific
method of Professor Sully would be needed, with a considerable
infusion of Thackeray added, and a leaven of pity, too.
Pity indeed. For though sheer brazen impudence and a determined
lady-killing may resort to this strange bottle, this phial of mockery, yet I
seem to see it being smuggled into simpler homes too. The poor clerk,
for example, who is forced by sheer poverty to spend his week or
fortnight in his London home, and by sheer shame to spend it almost
perdu; reading the paper in bed, smoking his pipe in his back yard,
helping with the children, playing pool at night over his glass in the
public-house at the corner—how would he feel when he returned to
work at the end of the period and had to confess that he had been
nowhere? That is the point to consider, for few of us are great, and he
is very small indeed. Amid triumphant stories of Margate and
Southend, Yarmouth and Southsea, Brighton and even Guernsey,
where would he be if he told the truth? Nowhere. And what fun is it not
to be anywhere? Don’t you see? And so do you blame him if he
spends 1s. 1½d., and anoints his countenance with a little of this
delusive fluid on the morning of his return, and, strong in its testimony,
talks vaguely but sufficiently of Herne Bay? Do you blame him? You
must be a devil of a fellow if you do.
In a way he is entirely justified, for there is no doubt that he is
gaining self-respect by losing it: that is to say, he would feel almost too
paltry if he had to confess to the real squalid economy of his fortnight.
And it is not good to feel too paltry.
But the wish to be thought more fashionable than one is, is not
confined to the respectable poor—the poor, that is, who are forced to
make something of a show: surely the least enviable class of all; the
poor, in other words, who have to forego all the privileges of being
poor. There is another class—Major Pendennis was at the head of it—
who must intrigue a little too, if they are not to be too miserable. I
remember a little man who had a room in Jermyn Street and lived in
his Club; it was his habit to disappear for a fortnight or so every 11th of
August, and reappear very brown and very vocal of the moors. His
colour was genuine—no 1s. 1½d. bottle, but the Lord of Light himself
had conferred it; yet not by beams that fell in Yorkshire or Scotland, but
on Brighton’s pier. How, then, did his narrative of triumph in the butts
carry conviction? What was his particular “Sunbronze”? He wore in the
ribbon of his hat a little row of grouse feathers.
And that possibly is what one has to remember—that “Sunbronze”
takes many forms—more than I know, or you know, or ever shall know,
however extensive our knowledge may be at this moment. For we all
“Sunbronze” a little; at least if not quite all, nearly all. We nearly all
hope you’ll think us greater than we are.
On Leaving One’s Beat