Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Download full Python for Everyone 2nd Edition Cay Horstmann ebook all chapters

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

Download the full version of the ebook at

https://ebookgate.com

Python for Everyone 2nd Edition Cay Horstmann

https://ebookgate.com/product/python-for-
everyone-2nd-edition-cay-horstmann/

Explore and download more ebook at https://ebookgate.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Python for Everyone 1st Edition Cay S. Horstmann

https://ebookgate.com/product/python-for-everyone-1st-edition-cay-s-
horstmann/

ebookgate.com

Object Oriented Design and Patterns 2nd Edition Cay S.


Horstmann

https://ebookgate.com/product/object-oriented-design-and-patterns-2nd-
edition-cay-s-horstmann/

ebookgate.com

Java Concepts Late Objects 3rd Edition Edition Cay S.


Horstmann

https://ebookgate.com/product/java-concepts-late-objects-3rd-edition-
edition-cay-s-horstmann/

ebookgate.com

Mark for Everyone 2nd Edition Tom Wright

https://ebookgate.com/product/mark-for-everyone-2nd-edition-tom-
wright/

ebookgate.com
Python for Bioinformatics 2nd Edition Sebastian Bassi

https://ebookgate.com/product/python-for-bioinformatics-2nd-edition-
sebastian-bassi/

ebookgate.com

Python for Scientists 2nd Edition John M. Stewart

https://ebookgate.com/product/python-for-scientists-2nd-edition-john-
m-stewart/

ebookgate.com

Six Sigma for Everyone 1st Edition George Eckes

https://ebookgate.com/product/six-sigma-for-everyone-1st-edition-
george-eckes/

ebookgate.com

A Web for Everyone 1st Edition Sarah Horton

https://ebookgate.com/product/a-web-for-everyone-1st-edition-sarah-
horton/

ebookgate.com

Python The Complete Manual The essential handbook for


Python users Master Python today First Edition Unknown

https://ebookgate.com/product/python-the-complete-manual-the-
essential-handbook-for-python-users-master-python-today-first-edition-
unknown/
ebookgate.com
Cay Horstmann
San Jose State University

Rance Necaise
Randolph-Macon College

Python for
Everyone
2/e
Copyright © 2016 John Wiley & Sons, Inc.

ISBN 978-1-119-05655-3

ISBN-BRV 978-1-119-05636-2

Printed in the United States of America


P R E FA C E

This book is an introduction to computer programming using Python that focuses on


the essentials—and on effective learning. Designed to serve a wide range of student
interests and abilities, it is suitable for a first course in programming for computer
scientists, engineers, and students in other disciplines. No prior programming expe-
rience is required, and only a modest amount of high school algebra is needed. For
pedagogical reasons, the book uses Python 3, which is more regular than Python 2.
Here are the book’s key features:
Present fundamentals first.
The book takes a traditional route, first stressing control structures, functions, proce-
dural decomposition, and the built-in data structures. Objects are used when appro-
priate in the early chapters. Students start designing and implementing their own
classes in Chapter 9.
Guidance and worked examples help students succeed.
Beginning programmers often ask “How do I start? Now what do I do?” Of course,
an activity as complex as programming cannot be reduced to cookbook-style instruc-
tions. However, step-by-step guidance is immensely helpful for building confidence
and providing an outline for the task at hand. “Problem Solving” sections stress the
importance of design and planning. “How To” guides help students with common
programming tasks. Numerous Worked Examples demonstrate how to apply chap-
ter concepts to interesting problems.
Problem solving strategies are made explicit.
Practical, step-by-step illustrations of techniques help students devise and evaluate
solutions to programming problems. Introduced where they are most relevant, these
strategies address barriers to success for many students. Strategies included are:
• Algorithm Design (with pseudocode) • Stepwise Refinement
• First Do It By Hand (doing sample • Adapting Algorithms
calculations by hand) • Discovering Algorithms by
• Flowcharts Manipulating Physical Objects
• Test Cases • Tracing Objects
• Hand-Tracing • Patterns for Object Data
• Storyboards • Thinking Recursively
• Solve a Simpler Problem First • Estimating the Running Time of
• Reusable Functions an Algorithm

Practice makes perfect.


Of course, programming students need to be able to implement nontrivial programs,
but they first need to have the confidence that they can succeed. This book contains
a substantial number of self-check questions at the end of each section. “Practice It”
pointers suggest exercises to try after each section. And additional practice oppor-
tunities, including automatically-graded programming exercises and skill-oriented
multiple-choice questions, are available online.
A visual approach motivates the reader and eases navigation.
Photographs present visual analogies that explain the
nature and behavior of computer concepts. Step-by-
step figures illustrate complex program operations.
Syntax boxes and example tables present a variety
of typical and special cases in a compact format. It
is easy to get the “lay of the land” by browsing the
visuals, before focusing on the textual material.
Focus on the essentials while being
technically accurate.
An encyclopedic coverage is not helpful for a begin-
ning programmer, but neither is the opposite—
reducing the material to a list of simplistic bullet points. In this book, the essentials
are presented in digestible chunks, with separate notes that go deeper into good prac-
tices or language features when the reader is ready for the additional information.
© Terraxplorer/iStockphoto.

New to This Edition


Extended Graphics and Image Processing
The use of graphics to reinforce language constructs has been extended to include the
use of image processing. Students are introduced to image processing in Chapter 4 as
they learn to design and use loops and again in Chapter 5 where they build a toolkit of
image processing functions.

Toolbox Sections
Many optional “Toolbox” sections introduce useful packages in the wonderful eco-
system of Python libraries. Students are empowered to perform useful work such
as statistical computations, drawing graphs and charts, sending e-mail, processing
spreadsheets, and analyzing web pages. The libraries are placed in the context of
computer science principles, and students learn how those principles apply to solving
real-world problems. Each Toolbox is accompanied by many new end-of-chapter
review and programming exercises.

Data Plotting
Several new Worked Examples show students how to create a visual representation
of data through graphical plots. These examples use the pyplot library to create simple
data plots as they show students how to apply the language constructs introduced in
the respective chapters.

Interactive Learning
Additional interactive content is available that integrates with this text and immerses
students in activities designed to foster in-depth learning. Students don’t just watch
animations and code traces, they work on generating them. The activities provide
instant feedback to show students what they did right and where they need to study
more. To find out more about how to make this content available in your course, visit
http://wiley.com/go/pfe2interactivities.
“CodeCheck” is an innovative online service that students can use to work on pro-
gramming problems. You can assign exercises that have already been prepared, and
you can easily add your own. Visit http://codecheck.it to learn more and to try it out.

A Tour of the Book


Figure 1 shows the dependencies between the chapters and how topics are organized.
The core material of the book is:
Chapter 1. Introduction Chapter 5. Functions
Chapter 2. Programming with Chapter 6. Lists
Numbers and Strings Chapter 7. Files and Exceptions
Chapter 3. Decisions Chapter 8. Sets and Dictionaries
Chapter 4. Loops

Two chapters cover object-oriented programming:


Chapter 9. Objects and Classes
Chapter 10. Inheritance
Two chapters support a course that goes more deeply into algorithm design and
analysis:
Chapter 11. Recursion
Chapter 12. Sorting and Searching

Fundamentals
1. Introduction
Object-Oriented Programming
Data Structures & Algorithms
2. Programming
with Numbers
and Strings

3. Decisions

4. Loops
A gentle
introduction to recursion
is optional.
5. Functions

Sections 6.1 – 6.3


Sections 7.1 and 7.2 (lists) can be covered
(text file processing) can be with Chapter 4.
6.6.Iteration
Lists
covered with Chapter 4.

7. Files and 8. Sets and 9. Objects


6. Iteration 11. Recursion
Exceptions Dictionaries and Classes

Figure 1 12. Sorting


10. Inheritance
and Searching
Chapter Dependencies
Appendices Six appendices provide a handy reference for students on operator
precedence, reserved words, Unicode, the Python standard library, and more.

Graphics and Image Processing


Writing programs that create drawings or process images can provide students with
effective visualizations of complex topics. Chapter 2 introduces the EzGraphics
open-source library and how to use it to create basic graphical drawings. The library,
which students find easier to use than Python’s standard Tkinter library, also sup-
ports simple image processing. Graphics Worked Examples and exercises are pro-
vided throughout the text, all of which are optional.

Exercises
End-of-chapter exercises contain a broad mix of review and programming questions,
with optional questions from graphics, science, and business. Designed to engage
students, the exercises illustrate the value of programming in applied fields.

Custom Book and eBook Options


Python For Everyone may be ordered in both custom print and eBook formats. You
can order a custom print version that includes your choice of chapters—including
those from other Horstmann titles. Visit customselect.wiley.com to create your custom
order.
Python For Everyone is also available in an electronic eBook format with three key
advantages:
• The price is significantly lower than for the printed book.
• The eBook contains all material in the printed book plus the web appendices in
one easy-to-browse format.
• You can customize the eBook to include your choice of chapters.
The interactive edition of Python For Everyone adds even more value by integrating
a wealth of interactive exercises into the eBook. See http://wiley.com/go/pfe2interac-
tivities to find out more about this new format.
Please contact your Wiley sales rep for more information about any of these
options or check www.wiley.com/college/horstmann for available versions.

Web Resources
This book is complemented by a complete suite of online resources. Go to www.wiley.
com/college/horstmann to visit the online companion sites, which include

• Source code for all examples programs and Worked Examples in the book.
• Lecture presentation slides (for instructors only).
• Solutions to all review and programming exercises (for instructors only).
• A test bank that focuses on skills, not just terminology (for instructors only). This
extensive set of multiple-choice questions can be used with a word processor or
imported into a course management system.
• “CodeCheck” assignments that allow students to work on programming prob-
lems presented in an innovative online service and receive immediate feedback.
Instructors can assign exercises that have already been prepared, or easily add
their own.
CONTENTS
PREFACE iii CE3 Unbalanced Parentheses 41
SPECIAL FEATURES xviii PT3 Use Spaces in Expressions 42
ST1 Other Ways to Import Modules 42
ST2 Combining Assignment and Arithmetic 42
1 INTRODUCTION 1 ST3 Line Joining 43

1.1 Computer Programs   2 2.3 PROBLEM SOLVING: First Do It By Hand   43


1.2 The Anatomy of a Computer   3 WE1 Computing Travel Time 45

CS1 Computers Are Everywhere 5 2.4 Strings  46


1.3 The Python Programming Language   5 The String Type 46
Concatenation and Repetition 47
1.4 Becoming Familiar with Your Programming
Converting Between Numbers and Strings 48
Environment  6 Strings and Characters 48
PT1 Interactive Mode 9 String Methods 50
PT2 Backup Copies 9 ST4 Character Values 51
ST1 The Python Interpreter 10 ST5 Escape Sequences 52
1.5 Analyzing Your First Program   11 CS1 International Alphabets and Unicode 52
1.6 Errors  13 2.5 Input and Output   53
CE1 Misspelling Words 15 User Input 53
1.7 PROBLEM SOLVING: Algorithm Design   15 Numerical Input 54
HT1 Describing an Algorithm with Formatted Output 54
Pseudocode 19 PT4 Don’t Wait to Convert 58
WE1 Writing an Algorithm for Tiling a Floor 20 HT1 Writing Simple Programs 58
WE2 Computing the Cost of Stamps 61
CS2 The Pentium Floating-Point Bug 63
2 PROGRAMMING WITH
NUMBERS AND STRINGS 27 2.6 GRAPHICS: Simple Drawings   63
Creating a Window 64
2.1 Variables  28 Lines and Polygons 66
Defining Variables 28 Filled Shapes and Color 67
Number Types 30 Ovals, Circles, and Text 69
Variable Names 31 HT2 GRAPHICS: Drawing Graphical Shapes 70
Constants 32 TOOLBOX1 Symbolic Processing with SymPy 73
Comments 33
CE1 Using Undefined Variables 34
PT1 Choose Descriptive Variable Names 34
3 DECISIONS 91
PT2 Do Not Use Magic Numbers 35
3.1 The if Statement   92
2.2 Arithmetic  35 CE1 Tabs 96
Basic Arithmetic Operations 35 PT1 Avoid Duplication in Branches 96
Powers 36 ST1 Conditional Expressions 97
Floor Division and Remainder 37
3.2 Relational Operators   97
Calling Functions 38
CE2 Exact Comparison of Floating-Point
Mathematical Functions 39
Numbers 101
CE2 Roundoff Errors 41
ST2 Lexicographic Ordering of Strings 101
HT1 Implementing an if Statement 102 Maximum and Minimum 184
WE1 Extracting the Middle 104 Comparing Adjacent Values 185
3.3 Nested Branches   106 4.6 The for Loop   187
PT2 Hand-Tracing 108 PT1 Count Iterations 191
CS1 Denver’s Luggage Handling System 109 HT1 Writing a Loop 192

3.4 Multiple Alternatives   110 4.7 Nested Loops   194


TOOLBOX1 Sending E-mail 113 ST3 Special Form of the print Function 198
WE1 Average Exam Grades 198
3.5 PROBLEM SOLVING: Flowcharts   115
WE2 A Grade Distribution Histogram 200
3.6 PROBLEM SOLVING: Test Cases   119
PT3 Make a Schedule and Make Time for 4.8 Processing Strings   202
Unexpected Problems 120 Counting Matches 202
Finding All Matches 203
3.7 Boolean Variables and Operators   121
Finding the First or Last Match 203
CE3 Confusing and and or Conditions 124
Validating a String 204
PT4 Readability 124
Building a New String 204
ST3 Chaining Relational Operators 125
4.9 APPLICATION: Random Numbers and
ST4 Short-Circuit Evaluation of Boolean
Operators 125 Simulations  206
ST5 De Morgan’s Law 126 Generating Random Numbers 207
Simulating Die Tosses 207
3.8 Analyzing Strings   126
The Monte Carlo Method 208
3.9 APPLICATION: Input Validation   130 WE3 GRAPHICS: Bull’s Eye 210
ST6 Terminating a Program 133
4.10 GRAPHICS: Digital Image Processing   212
ST7 Interactive Graphical Programs 133
Filtering Images 212
CS2 Artificial Intelligence 134
Reconfiguring Images 215
WE2 GRAPHICS: Intersecting Circles 134
TOOLBOX2 Plotting Simple Graphs 138 4.11 PROBLEM SOLVING: Solve a Simpler
Problem First   217
CS2 Digital Piracy 223
4 LOOPS 165
4.1 The while Loop   166 5 FUNCTIONS 245
CE1 Don’t Think “Are We There Yet?” 170
CE2 Infinite Loops 171 5.1 Functions as Black Boxes   246
CE3 Off-by-One Errors 171 5.2 Implementing and Testing Functions   248
CS1 The First Bug 172 Implementing a Function 248
4.2 PROBLEM SOLVING: Hand-Tracing   173 Testing a Function 249
Programs that Contain Functions 250
4.3 APPLICATION: Processing Sentinel
PT1 Function Comments 252
Values  176
5.3 Parameter Passing   252
ST1 Processing Sentinel Values with a
Boolean Variable 179 PT2 Do Not Modify Parameter Variables 254

ST2 Redirection of Input and Output 179 CE1 Trying to Modify Arguments 254

4.4 PROBLEM SOLVING: Storyboards   180 5.4 Return Values   255


ST1 Using Single-Line Compound
4.5 Common Loop Algorithms   183
Statements 256
Sum and Average Value 183 HT1 Implementing a Function 257
Counting Matches 184
WE1 Generating Random Passwords 259
Prompting Until a Match is Found 184
5.5 Functions Without Return Values   263 Copying Lists 326
5.6 PROBLEM SOLVING: Reusable ST2 Slices 328

Functions  265 6.3 Common List Algorithms   328


CS1 Personal Computing 268 Filling 329
5.7 PROBLEM SOLVING: Stepwise Combining List Elements 329
Element Separators 329
Refinement  269
Maximum and Minimum 330
PT3 Keep Functions Short 273
Linear Search 330
PT4 Tracing Functions 274
Collecting and Counting Matches 331
PT5 Stubs 275
Removing Matches 331
WE2 Calculating a Course Grade 275 Swapping Elements 332
WE3 Using a Debugger 278 Reading Input 333
5.8 Variable Scope   282 WE1 Plotting Trigonometric Functions 335
PT6 Avoid Global Variables 285 6.4 Using Lists with Functions   338
WE4 GRAPHICS: Rolling Dice 285 ST3 Call by Value and Call by Reference 341
5.9 GRAPHICS: Building an Image Processing ST4 Tuples 342
Toolkit  288 ST5 Functions with a Variable Number of
Getting Started 288 Arguments 342
Comparing Images 289 ST6 Tuple Assignment 343
Adjusting Image Brightness 290 ST7 Returning Multiple Values with Tuples 343
Rotating an Image 291 TOOLBOX1 Editing Sound Files 344
Using the Toolkit 292 6.5 PROBLEM SOLVING: Adapting
WE5 Plotting Growth or Decay 294 Algorithms  345
5.10 Recursive Functions (Optional)   296 HT1 Working with Lists 347
HT2 Thinking Recursively 299 WE2 Rolling the Dice 349

6.6 PROBLEM SOLVING: Discovering Algorithms by


6 LISTS 315 Manipulating Physical Objects   352
6.7 Tables  356
6.1 Basic Properties of Lists   316
Creating Tables 357
Creating Lists 316
Accessing Elements 358
Accessing List Elements 317
Locating Neighboring Elements 358
Traversing Lists 318
Computing Row and Column Totals 359
List References 319
Using Tables with Functions 360
CE1 Out-of-Range Errors 320
WE3 A World Population Table 362
ST1 Reverse Subscripts 320
ST8 Tables with Variable Row Lengths 364
PT1 Use Lists for Sequences of Related
WE4 GRAPHICS: Drawing Regular Polygons 365
Items 321
CS1 Computer Viruses 321

6.2 List Operations   322 7 FILES AND EXCEPTIONS 383


Appending Elements 322 7.1 Reading and Writing Text Files   384
Inserting an Element 322
Opening a File 384
Finding an Element 323
Reading from a File 385
Removing an Element 324
Writing from a File 386
Concatenation and Replication 325
A File Processing Example 386
Equality Testing 325
CE1 Backslashes in File Names 388
Sum, Maximum, Minimum, and Sorting 325
7.2 Text Input and Output   388 PT1 Use Python Sets, Not Lists, for Efficient Set
Iterating over the Lines of a File 388 Operations 466
Reading Words 390 ST1 Hashing 467
Reading Characters 392 CS1 Standardization 468
Reading Records 393 8.2 Dictionaries  468
ST1 Reading the Entire File 397 Creating Dictionaries 469
ST2 Regular Expressions 397 Accessing Dictionary Values 470
ST3 Character Encodings 398 Adding and Modifying Items 470
TOOLBOX1 Working with CSV Files 399 Removing Items 471
7.3 Command Line Arguments   401 Traversing a Dictionary 472
HT1 Processing Text Files 404 ST2 Iterating over Dictionary Items 475

WE1 Analyzing Baby Names 407 ST3 Storing Data Records 475

TOOLBOX2 Working with Files and WE2 Translating Text Messages 476
Directories 410 8.3 Complex Structures   478
CS1 Encryption Algorithms 412 A Dictionary of Sets 478
7.4 Binary Files and Random Access A Dictionary of Lists 481
(Optional)  413 ST4 User Modules 484
Reading and Writing Binary Files 413 WE3 GRAPHICS: Pie Charts 484
Random Access 414 TOOLBOX1 Harvesting JSON Data from
Image Files 415 the Web 489
Processing BMP Files 416
WE2 GRAPHICS: Displaying a Scene File 419 9 OBJECTS AND CLASSES 499
7.5 Exception Handling   422
Raising Exceptions 423
9.1 Object-Oriented Programming   500
Handling Exceptions 424 9.2 Implementing a Simple Class   502
The finally Clause 426 9.3 Specifying the Public Interface of
PT1 Raise Early, Handle Late 428 a Class   506
PT2 Do Not Use except and finally in the
Same try Statement 428
9.4 Designing the Data Representation   508
PT1 Make All Instance Variables Private, Most
ST4 The with Statement 428
Methods Public 509
TOOLBOX3 Reading Web Pages 429
9.5 Constructors  510
7.6 APPLICATION: Handling Input Errors   430
CE1 Trying to Call a Constructor 512
TOOLBOX4 Statistical Analysis 433
ST1 Default and Named Arguments 512
WE3 Creating a Bubble Chart 438
CS2 The Ariane Rocket Incident 441 9.6 Implementing Methods   513
PT2 Define Instance Variables Only in the
Constructor 516
8 SETS AND ST2 Class Variables 516
DICTIONARIES 457 9.7 Testing a Class   517
8.1 Sets  458 HT1 Implementing a Class 519
WE1 Implementing a Bank Account Class 522
Creating and Using Sets 458
Adding and Removing Elements 459 9.8 PROBLEM SOLVING: Tracing Objects   525
Subsets 460 9.9 PROBLEM SOLVING: Patterns for
Set Union, Intersection, and Difference 461
Object Data   528
WE1 Counting Unique Words 465
Keeping a Total 528
Counting Events 529
Collecting Values 529 11 RECURSION 611
Managing Properties of an Object 530
Modeling Objects with Distinct States 530 11.1 Triangle Numbers Revisited   612
Describing the Position of an Object 531 CE1 Infinite Recursion 615
CS1 Electronic Voting Machines 533 ST1 Recursion with Objects 616
9.10 Object References   534 11.2 PROBLEM SOLVING: Thinking
Shared References 534 Recursively  616
The None Reference 536 WE1 Finding Files 620
The self Reference 536
11.3 Recursive Helper Functions   621
The Lifetime of Objects 537
11.4 The Efficiency of Recursion   622
9.11 APPLICATION: Writing a Fraction
Class  538 11.5 Permutations  627
CS1 The Limits of Computation 630
Fraction Class Design 538
The Constructor 539 11.6 Backtracking  631
Special Methods 540 WE2 Towers of Hanoi 636
Arithmetic Operations 542
11.7 Mutual Recursion   639
Logical Operations 543
TOOLBOX1 Analyzing Web Pages with
ST3 Object Types and Instances 546 Beautiful Soup 643
WE2 GRAPHICS: A Die Class 547
CS2 Open Source and Free Software 550
12 SORTING AND
SEARCHING 655
10 INHERITANCE 563
12.1 Selection Sort   656
10.1 Inheritance Hierarchies   564
12.2 Profiling the Selection Sort
PT1 Use a Single Class for Variation in Values,
Inheritance for Variation in Behavior 567
Algorithm  658
ST1 The Cosmic Superclass: object 568 12.3 Analyzing the Performance of the
10.2 Implementing Subclasses   569 Selection Sort Algorithm   660
ST1 Oh, Omega, and Theta 662
CE1 Confusing Super- and Subclasses 572
ST2 Insertion Sort 663
10.3 Calling the Superclass Constructor   573
12.4 Merge Sort   664
10.4 Overriding Methods   577
CE2 Forgetting to Use the super Function When
12.5 Analyzing the Merge Sort Algorithm   667
Invoking a Superclass Method 580 ST3 The Quicksort Algorithm 669

10.5 Polymorphism  580 12.6 Searching  671


ST2 Subclasses and Instances 584 Linear Search 671
Binary Search 672
ST3 Dynamic Method Lookup 584
ST4 Abstract Classes 585 12.7 PROBLEM SOLVING: Estimating the Running
CE3 Don’t Use Type Tests 586 Time of an Algorithm   674
HT1 Developing an Inheritance Hierarchy 586 Linear Time 674
WE1 Implementing an Employee Hierarchy for Quadratic Time 675
Payroll Processing 591 The Triangle Pattern 676
Logarithmic Time 677
10.6 APPLICATION: A Geometric Shape Class
PT1 Searching and Sorting 679
Hierarchy  594
ST4 Comparing Objects 679
The Base Class 595
WE1 Enhancing the Insertion Sort Algorithm 680
Basic Shapes 597
Groups of Shapes 600 CS1 The First Programmer 683
Appendix A PYTHON OPERATOR SUMMARY   A-1 GLOSSARY  A-20
Appendix B PYTHON RESERVED WORD INDEX  A-25
SUMMARY  A-3 CREDITS  A-40
Appendix C THE PYTHON STANDARD
LIBRARY  A-5
Appendix D THE BASIC LATIN AND LATIN-1 SUBSETS
OF UNICODE*
Appendix E BINARY NUMBERS AND BIT OPERATIONS*
Appendix F HTML SUMMARY*

*On the companion site at www.wiley.com/college/horstmann.

ALPHABETICAL LIST OF SYNTAX BOXES


Assignment  29
Calling Functions  38
Constructor  511
for Statement  188
for Statement with range Function  189
Function Definition  249
Handling Exceptions  425
if Statement  94
Lists  317
Method Definition  514
Opening and Closing FIles   385
print Statement  12
Program with Functions   250
Raising an Exception   424
Set and Dictionary Literals   469
String Format Operator   55
Subclass Constructor  573
Subclass Definition  570
The finally Clause  426
while Statement  167
xviii Special Features

Toolboxes How Tos


CHAPTE R Common and and
Errors © Steve Simzer/iStockphoto.

Worked Examples Worked Examples


chalice: Paul Fleet/Getty Images, Inc.; © Tom Horyn/iStockphoto.

.otohpkcotSi/eélessI cirE © tools: mattjeacock/Getty Images, Inc.

1 Misspelling Words 15 Describing an Algorithm


with Pseudocode 19
Writing an Algorithm for
Tiling a Floor 20

2 Using Undefined Variables 34 Symbolic Processing Computing Travel Time  45


Roundoff Errors 41 with SymPy 73 Writing Simple Programs 58
Unbalanced Parentheses 41 Computing the Cost
of Stamps  61
Graphics: Drawing
Graphical Shapes  70

3 Tabs 96 Sending E-mail 113 Implementing an


Exact Comparison of Plotting Simple Graphs 138 if Statement 102
Floating-Point Numbers 101 Extracting the Middle 104
Confusing and and Graphics: Intersecting
or Conditions 124 Circles 134

4 Don’t Think “Are We A Grade Distribution Writing a Loop 192


There Yet?” 170 Histogram 200 Average Exam Grades 198
Infinite Loops 171 Graphics: Bull’s Eye 210
Off-by-One Errors 171

5 Trying to Modify Plotting Growth or Decay 294 Implementing a Function 257


Arguments 254 Generating Random
Passwords 259
Calculating a Course Grade 275
Using a Debugger 278
Graphics: Rolling Dice 285
Thinking Recursively 299
Special Features xix

Programming
Special Topics Random Facts
Tips
© Stephen Coburn/123RF.com.
© Mikhail Mishchenko/123RF Limited. © modella/123RF.com.
Interactive Mode 9 The Python Interpreter 10 Computers Are Everywhere 5
Backup Copies  9

Choose Descriptive Other Ways to Import Modules 42 International Alphabets and


Variable Names  34 Combining Assignment and Unicode  52
Do Not Use Magic Numbers  35 Arithmetic  42 The Pentium Floating-
Use Spaces in Expressions  42 Line Joining  43 Point Bug 63
Don’t Wait to Convert  58 Character Values  51
Escape Sequences  52

Avoid Duplication in Branches  96 Conditional Expressions   97 Denver’s Luggage


Hand-Tracing 108 Lexicographic Ordering Handling System  109
Make a Schedule and Make Time of Strings  101 Artificial Intelligence  134
for Unexpected Problems  120 Chaining Relational
Readability 124 Operators  125
Short-Circuit Evaluation of
Boolean Operators  125
De Morgan’s Law 126
Terminating a Program  133
Interactive Graphical Programs 133

Count Iterations  191 Processing Sentinel Values The First Bug 172
with a Boolean Variable   179 Digital Piracy 223
Redirection of Input and
Output 179
Special Form of the print
Function  188

Function Comments 252 Using Single-Line Compound Personal Computing  257


Do Not Modify Parameter Statements  256
Variables 254
Keep Functions Short 273
Tracing Functions  274
Stubs 275
Avoid Global Variables  285
xx Special Features

Toolboxes How Tos


CHAPTE R Common and and
Errors © Steve Simzer/iStockphoto.

Worked Examples Worked Examples


chalice: Paul Fleet/Getty Images, Inc.; © Tom Horyn/iStockphoto.

.otohpkcotSi/eélessI cirE © tools: mattjeacock/Getty Images, Inc.

6 Out-of-Range Errors  320 Plotting Trigonometric Working with Lists  347


Functions 335 Rolling the Dice  349
Editing Sound Files 344 A World Population
Table 362
Graphics: Drawing Regular
Polygons 365

7 Backslashes in File Names  388 Working with CSV Files 399 Processing Text Files  404
Working with Files and Analyzing Baby Names  407
Directories 410 Graphics: Displaying a
Reading Web Pages 429 Scene File  419
Statistical Analysis 433
Creating a Bubble Chart 438

8 Harvesting JSON Data Counting Unique Words  465


from the Web 489 Translating Text
Messages  476
Graphics: Pie Charts  484

9 Trying to Call a Constructor  512 Implementing a Class  519


Implementing a Bank
Account Class  522
Graphics: A Die Class  547

10 Confusing Super- and Developing an


Subclasses 572 Inheritance Hierarchy 586
Forgetting to Use the super Implementing an
Function When Invoking Employee Hierarchy for
a Superclass Method 580 Payroll Processing 591
Don’t Use Type Tests 586

11 Infinite Recursion  615 Analyzing Web Pages with Finding Files 620
Beautiful Soup 643 Towers of Hanoi 636

12 Enhancing the Insertion


Sort Algorithm 680
Special Features xxi

Programming
Special Topics Random Facts
Tips
© Stephen Coburn/123RF.com.
Use ListsMishchenko/123RF
© Mikhail for SequencesLimited.
of Reverse Subscripts
© modella/123RF.com. 320 Computer Viruses 321
Related Items 321 Slices 328
Call by Value and
Call by Reference 341
Tuples 342
Functions with a Variable
Number of Arguments  342
Tuple Assignment  343
Returning Multiple Values
with Tuples 343
Tables with Variable
Row Lengths 364

Raise Early, Handle Late  428 Reading the Entire File  397 Encryption Algorithms 412
Do Not Use except and finally Regular Expressions  397 The Ariane Rocket Incident 441
in the Same try Statement  428 Character Encodings  398
The with Statement 428

Use Python Sets, Not Lists, for Hashing  467 Standardization 468
Efficient Set Operations 466 Iterating over
Dictionary Items  475
Storing Data Records  475
User Modules  484

Make all Instance Variables Private, Default and Named Electronic Voting Machines 533
Most Methods Public  509 Arguments  512 Open Source and
Define Instance Variables Class Variables  516 Free Software 550
Only in the Constructor  516 Object Types and Instances  546

Use a Single Class for Variation The Cosmic Superclass:


in Values, Inheritance for object 568
Variation in Behavior 567 Subclasses and Instances 584
Dynamic Method Lookup 584
Abstract Classes 585

Recursion with Objects 616 The Limits of


Computation 630

Searching and Sorting 679 Oh, Omega, and Theta 662 The First Programmer 683
Insertion Sort 663
The Quicksort Algorithm 669
Comparing Objects 679
1
INTRODUCTION

CHAPTER GOALS

To learn about computers


and programming
To write and run your first Python program
To recognize compile-time and run-time errors
© JanPietruszka/iStockphoto.

To describe an algorithm with pseudocode

CHAPTER CONTENTS

1.1 COMPUTER PROGRAMS 2 1.5 ANALYZING YOUR FIRST


PROGRAM 11
1.2 THE ANATOMY OF A
Syntax 1.1: print Statement 12
COMPUTER 3
Computing & Society 1.1: Computers Are 1.6 ERRORS 13
Everywhere 5 Common Error 1.1: Misspelling Words 15

1.3 THE PYTHON PROGRAMMING 1.7 PROBLEM SOLVING:


LANGUAGE 5 ALGORITHM DESIGN 15
How To 1.1: Describing an Algorithm with
1.4 BECOMING FAMILIAR WITH YOUR
Pseudocode 19
PROGRAMMING ENVIRONMENT 6
Worked Example 1.1: Writing an Algorithm for
Programming Tip 1.1: Interactive Mode 9
Tiling a Floor 20
Programming Tip 1.2: Backup Copies 9
Special Topic 1.1: The Python Interpreter 10
Just as you gather tools, study a project, and make a plan for
tackling it, in this chapter you will gather up the basics you
need to start learning to program. After a brief introduction
to computer hardware, software, and programming in
general, you will learn how to write and run your first
Python program. You will also learn how to diagnose and
fix programming errors, and how to use pseudocode to
describe an algorithm—a step-by-step description of how
to solve a problem—as you plan your computer programs.

© JanPietruszka/iStockphoto.

JanPietruszka/iStockphoto.

1.1 Computer Programs


Computers
You have probably used a computer for work or fun. Many people use computers
execute very basic for everyday tasks such as electronic banking or writing a term paper. Computers are
instructions in rapid good for such tasks. They can handle repetitive chores, such as totaling up numbers
succession.
or placing words on a page, without getting bored or exhausted.
The flexibility of a computer is quite an amazing phenomenon. The same machine
can balance your checkbook, lay out your term paper, and play a game. In contrast,
other machines carry out a much nar­rower range of tasks; a car drives and a toaster
toasts. Computers can carry out a wide range of tasks because they execute different
programs, each of which directs the computer to work on a specific task.
A computer program
The computer itself is a machine that stores data (numbers, words, pictures), inter-
is a sequence of acts with devices (the monitor, the sound system, the printer), and executes programs.
instructions and A computer program tells a computer, in minute detail, the sequence of steps that are
decisions.
needed to fulfill a task. The physical computer and periph­eral devices are collectively
called the hardware. The programs the computer executes are called the soft­ware.
Today’s computer programs are so sophisticated that it is hard to believe that they
are composed of extremely primitive instructions. A typical instruction may be one
of the following:
• Put a red dot at a given screen position.
• Add up two numbers.
• If this value is negative, continue the program at a certain instruction.
The computer user has the illusion of smooth interaction because a program contains
a huge number of such instructions, and because the computer can execute them at
great speed.
Programming is the
The act of designing and implementing computer programs is called program-
act of designing ming. In this book, you will learn how to program a computer—that is, how to direct
and implementing the computer to execute tasks.
computer programs.
To write a computer game with motion and sound effects or a word processor
that supports fancy fonts and pictures is a complex task that requires a team of many
highly-skilled programmers. Your first programming efforts will be more mundane.
The concepts and skills you learn in this book form an important foundation, and
you should not be disappointed if your first programs do not rival the sophis­ticated
software that is familiar to you. Actually, you will find that there is an immense thrill
even in sim­ple programming tasks. It is an amazing experience to see the computer
precisely and quickly carry out a task that would take you hours of drudgery, to

2
1.2 The Anatomy of a Computer 3

make small changes in a program that lead to immediate improvements, and to see the
computer become an extension of your mental powers.

SELF CHECK 1. What is required to play music on a computer?


2. Why is a CD player less flexible than a computer?
3. What does a computer user need to know about programming in order to play a
video game?
© Nicholas Homrich/iStockphoto.

1.2 The Anatomy of a Computer


To understand the programming process, you need to have a rudimentary under-
standing of the building blocks that make up a computer. We will look at a personal
computer. Larger computers have faster, larger, or more powerful components, but
they have fundamentally the same design.
At the heart of the computer lies the central processing unit (CPU) (see Figure 1).
The inside wiring of the CPU is enormously complicated. The CPUs used for per­
sonal computers at the time of this writing are composed of several hundred million
The central structural elements, called transistors.
processing unit (CPU) The CPU performs program control and data processing. That is, the CPU locates
performs program and executes the program instructions; it carries out arithmetic operations such as
control and data
processing. addition, subtraction, multiplication, and division; it fetches data from external mem-
ory or devices and places processed data into storage.
Storage devices
There are two kinds of storage. Primary storage is made from memory chips:
include memory and electronic circuits that can store data, provided they are supplied with electric power.
secondary storage. Secondary storage, usually a hard disk (see Figure 2), provides slower and less
expensive storage that persists without electricity. A hard disk consists of rotating
platters, which are coated with a mag­netic material, and read/write heads, which can
detect and change the magnetic flux on the platters.
The computer stores both data and programs. They are located in secondary stor-
age and loaded into memory when the program starts. The program then updates the
data in memory and writes the modified data back to secondary storage.

PhotoDisc, Inc./Getty Images, Inc.


© Amorphis/iStockphoto.

Figure 1 Central
© Amorphis/iStockphoto. Processing Unit Figure 2 A Hard Disk
PhotoDisc, Inc./Getty Images, Inc.
4 Chapter 1 Introduction

Printer

Mouse/Trackpad Ports Disk


controller

Keyboard Secondary storage

CPU
Monitor
Microphone
Memory

Speakers

Network
controller Internet

Figure 3 Schematic Design of a Personal Computer

To interact with a human user, a computer requires peripheral devices. The com-
puter transmits infor­mation (called output) to the user through a display screen,
speakers, and printers. The user can enter information (called input) for the computer
by using a keyboard or a pointing device such as a mouse.
Some computers are self-contained units, whereas others are interconnected
through networks. Through the network cabling, the computer can read data and
programs from central storage locations or send data to other computers. To the user
of a networked computer, it may not even be obvious which data reside on the com-
puter itself and which are transmitted through the network.
Figure 3 gives a schematic overview of the architecture of a personal computer.
Program instructions and data (such as text, numbers, audio, or video) are stored on
the hard disk, on a compact disk (or DVD), or elsewhere on the network. When a
program is started, it is brought into memory, where the CPU can read it. The CPU
reads the program one instruction at a time. As directed by these instructions, the
CPU reads data, modifies it, and writes it back to memory or the hard disk. Some pro-
gram instruc­tions will cause the CPU to place dots on the display screen or printer or
to vibrate the speaker. As these actions happen many times over and at great speed,
the human user will perceive images and sound. Some program instructions read user
input from the keyboard or mouse. The program analyzes the nature of these inputs
and then executes the next appropriate instruction.

SELF CHECK 4. Where is a program stored when it is not currently running?


5. Which part of the computer carries out arithmetic operations, such as addition
and multiplication?
© Nicholas Homrich/iStockphoto.
Practice It Now you can try these exercises at the end of the chapter: R1.2, R1.3.
Another random document with
no related content on Scribd:
(Academy, 30th March 1895.)
THOMAS COLLIER
English landscape art—the practice of which he had adorned by five-
and-twenty years of noble work—sustains a profound loss in the
death of Thomas Collier. He was born in the year 1840, at Glossop,
on the Derbyshire border. He early addressed himself to the career
of a landscape painter; and it is true, no doubt, that his method was
founded upon that of David Cox, nor is it possible that he could have
set up for himself a better model of delicacy of observation, and of
decisive and economical handwork. And the medium of Collier was—
like that of David Cox—almost exclusively water-colour. His oil
paintings were few, and, like Cox’s, they were executed chiefly in his
later time. But, with him, the later time was still only middle age.
Collier died when he was fifty-one: David Cox at seventy-six. Had
David Cox left us at the age of Collier, he would hardly have been
remembered to-day, and could have been an example to no one.
Collier passed through no such prolonged period of preparation for
mastery. He was already a master in his early manhood. His work
cannot well be divided into periods: freedom of manner, largeness of
vision and touch, belonged to him almost from the first. To the quite
superficial observer of his drawings, it appeared that he painted only
two or three subjects, and these on the same grey day. But to the
real student of his work, the richness and variety of his resource is
revealed. He observed and recorded differences of weather and light
which escape all casual and all untrained notice; and if he was
among the simplest and most vigorous, he was also among the most
poetic recorders of English countryside and homestead—of farm,
and coast, and moor. His work, exhibited in France, obtained for him
the decoration of a chevalier of the Legion of Honour, and here in
England he was one of the most distinguished members of the Royal
Institute of Painters in Water-Colours. But it is doubtful whether the
opportunities afforded to the large public for seeing his work were
frequent enough to secure him that degree of actual popularity
which was his due; and it is at all events certain that when the
cabinet of sketches which he showed occasionally to his friends shall
come to be known more widely, Collier will be accorded, without
cavil or questioning, a lasting place among the Masters.

(Academy, 23rd May 1891.)


LORD LEIGHTON
By the death of Lord Leighton, the Royal Academy loses a great
President and England a many-sided artist, who was certainly not far
removed from being a great painter. It was more, perhaps, by the
combination of so many various qualities of character and talent
than by the firm possession of one especial vein of genius, that ‘our
dear President, our admirable Leighton’—to use the words most
fittingly applied to him by Sir John Millais—had come, of recent years
at least, to be distinguished and known. The painter’s and designer’s
art, evidenced in his youth, about forty years ago, by the ‘Procession
of Cimabue,’ had not only never fallen into disuse, but had never
come to occupy, in his mind, a secondary or comparatively
unregarded place. But, along with the well-maintained devotion to
the craft to which he had first vowed his affections a full generation
ago, there had sprung up, partly of necessity and partly by reason of
Lord Leighton’s exceptional temperament, many interests, exclusive
of merely official duties, which occupied time and thought—so much
so that if he had not added to the tastes of an artist the habits and
qualifications of a great man of affairs, it would have been
impossible for him to have successfully crowded into his life all the
pursuits that engrossed it. It is easy for the ‘admirable Crichton,’ in
these modern times, to degenerate into the Mr. Brook of
Middlemarch—the not unamiable dilettante who was pretty certain
to have once ‘taken up’ everything, and was pretty certain also to
have dropped it. But Lord Leighton, great as was the diversity of his
interests, was absolutely systematic and thoroughgoing; and,
outside his especial art (in which his place, whatever may have been
his deficiencies, was peculiar and unquestioned), he not only
practised but excelled.
Leighton was linguist, student, antiquary, man of fashion,
administrator, even philanthropist. His oratory was an
accomplishment; albeit, in its addiction to ingenious ornament, his
style was not quite of our period. His tact in dealing with men and
with affairs was almost faultless. His opinions were decided, and he
never concealed them; yet, in uttering them, he hardly ever gave
offence—never, indeed, to the reasonable. When all these things are
remembered, and when there is added to them the recollection of a
presence elegant and stately, and of a manner which, though it
could well keep intruders at a distance, had singular and winning
charm for the many whom it was intended to please, it will be fully
realised what a difficult and heavy honour awaits Lord Leighton’s
successor in his great function—that of President of the Royal
Academy, and official representative of English Art. The Academy
contains several painters of genius; several amiable and
distinguished men of the world; but as those who can look back the
furthest declare that no past President of whom they had any
knowledge ever equalled Lord Leighton, it may well be doubted
whether a future President is likely to equal him.
So much by way of rough indication of the character of the man,
and of the public man. A further explanation of his individuality
must, of course, be discovered in his Art; and even a cursory survey
of it—and of the creations which were the events of his life—will
disclose something of his strength, and something, too, of his
weakness. The son of a physician whose life was extended to a most
ripe old age, and grandson of Sir James Leighton, also a doctor—
long resident at the Court of St. Petersburg—Frederic Leighton was
born at Scarborough, on the 3rd December 1830. A Yorkshireman in
fact—like William Etty, and another remarkable artist of a later
generation, Thomas Collier—no one could have been less of a
Yorkshireman in character than was the late President. To what is
understood or conjectured to have been a Jewish strain in his blood
are possibly to be attributed his profoundly artistic inclinations,
which were manifested very early, and which, as the public knows,
dominated the whole of his career. It is recorded that young
Leighton received drawing lessons in Rome as long ago as the year
1842; and not two years afterwards he entered as a student at the
Academy of Berlin. With Rome, perhaps, began that long series of
Wanderjahre which made him so cosmopolitan an artist and so
many-sided a man. He had some general education at Frankfort;
then, after a removal to Florence, where the American sculptor,
Hiram Powers, was consulted with a view to an opinion on his ability,
and prophesied that the boy ‘could become as eminent as he
pleased,’ young Leighton’s father withdrew his long-standing
objections to the adoption of painting as a profession; and the new
decision was followed by a sojourn in Brussels and a longer stay in
Paris. In Paris the youth attended a life-school, and copied at the
Louvre. Next we hear of him at Vienna, where he was a pupil of
Steinle, himself a pupil of Overbeck. Of Overbeck’s religious unction,
Leighton had never a perceptible share. Something he no doubt
owed to the leaders of the German Renaissance of Painting; but
amongst these, more, it may be, to Cornelius than Overbeck. After
his sojourn in Vienna, he was back again in Rome—these early and
most prolonged wanderings are worthy of chronicle, because they
had so much to do with the formation of the characteristics of the
artist—and it was from Rome that he sent to the Royal Academy
Exhibition of 1855 a picture which made no bid for immediately
popular effect, which was nothing, moreover, of a ‘pot-boiler,’ and
which made no concession to ordinary bourgeois liking. It was the
canvas in which is depicted, with something of reticence and grace,
and with a very learned draughtsmanship, the procession which
passed through the streets of Florence, on its way to Santa Maria
Novella, when Cimabue’s picture of the Madonna was carried in the
midst, and honour and peculiar recognition—in which a whole city
joined—were bestowed upon its painter. Elegant as the picture was,
it did not lack favour; a certain relative warmth, a certain romantic
spirit, the presentation of the ideal, it may be, in more homely form,
pleased a generation familiar with Dyce, Maclise, and Cope; and the
picture, as it happened, had an immediate success.
Paris was Leighton’s next halting-place, and now, an artist rising
above the horizon, he was no longer likely to seek direct instruction
from any one of the painters who were there at work; but he was
associated with, and was to some extent influenced by, men like Ary
Scheffer (whose ‘Augustine and Monica’ was long appreciated in
England) and Robert Fleury. He contributed almost without
intermission, for the next eight or nine years, to the Royal Academy,
and it was in 1864, when he was represented by an ‘Orpheus and
Eurydice,’ that he was elected to the Associateship—becoming in
1869 a full member. The year of his election to the Associateship
was likewise the year of the exhibition of his charming and seductive
invention, ‘Golden Hours.’ To the painter of mediæval or Renaissance
history, and of themes avowedly classic, there was vouchsafed the
expression of the romantic and the unquestionably poetic, and it is,
no doubt, to the certain element of poetry that is in Lord Leighton’s
work—far more, at all events, than to its austerer qualities of design,
which never had any popularity at all, and which, even amongst
painters, have gone terribly out of fashion—that is to be attributed
part of the great favour which his art has enjoyed. In 1869 was
shown ‘Electra at the Tomb of Agamemnon,’ and in 1876 the second
great processional, ‘The Daphnephoria.’ Two years later the ‘Arts of
War’—not the least dignified and decorative of modern frescoes—
was finished for South Kensington, where was already its
companion, ‘The Industrial Arts of Peace,’ completed in 1873;
another mural painting, that of ‘The Wise and Foolish Virgins,’
having, at an earlier date, been placed in the chancel of a fortunate
parish church in Hampshire. The year of the completion of ‘The Arts
of War’ was that of Lord Leighton’s election to the Presidency of the
Academy, which he obtained, it will be remembered, in direct
succession to Sir Francis Grant, with whose courtly qualities, and
with whose large and manly sympathies, he combined a width of
artistic outlook, a refinement of artistic expression, which had
scarcely perhaps belonged to any President of the Academy since
the days of its first leader, Sir Joshua Reynolds.
President, and knighted in consequence of that distinction in
1878, Leighton was given a baronetcy in 1886. In the interval he
had not only proved beyond dispute his fitness for the
responsibilities of the official position, which he filled, but—to
mention only some of the most memorable of many works—had
completed his own portrait for the Uffizi, had wrought the really
grave and impressive canvas of Elisha raising the son of the
Shunamite widow, and had, in his peculiar fashion, effected an
alliance between luxury in colour and sculpturesque arrangement of
‘line’ in the great ‘Cymon and Iphigenia.’ In actual Sculpture, too—
sharing the ambition of the men of the Renaissance for a triumph in
various mediums—he had produced ‘The Sluggard.’ It was
extraordinarily clever, but perhaps its qualities were less truly
sculptural than was some of his design executed in the older and
more familiar material. Yet, if this particular work did not possess to
the full all the great qualities that might have been expected in it,
the order of Lord Leighton’s talent was one, nevertheless, which
empowered him to succeed thoroughly in Sculpture, sooner or later;
for, in Sculpture, while there was room for the generally unimpeded
play of his own skill in design, there might have been a relief found
from the exercise of his art in a path in which success to him was
more uncertain and capricious—the path of colour.
It is too early, of course, to attempt to settle definitely the place
of Leighton in English Art; but it is certain that his influence, whether
as President or painter, tended to the extension of its vistas. An
upholder of the Classic—never, with all his range, much in love with
Realism—he was yet nothing whatever of a partisan, and—it may be
mentioned as a characteristic detail of him in his daily ways—he was
accustomed from time to time to purchase clever little drawings
(sometimes the very last one would have thought he would care for)
by artists who esteemed him as a President, but who regarded him
very lightly as a practitioner of their own craft. Lord Leighton was
perfectly aware that several circumstances limited—especially of late
years—the appreciation of his work. He was not altogether
insensible of its real defects—at all events, of peculiarities which
were defects upon occasion. He knew that his ‘brush-work’ was not
absolutely ‘modern.’ He must have allowed that, now and again,
when it was by no means one of his aims to seek it, the texture of
his flesh was porcelain-like, and thus mainly conventional. He was,
confessedly, not greatly occupied with ‘values’ of colour, with the
relation of part to part. He was at one—perhaps more than they
knew it—with many of our newest artists in demanding a decorative
quality; only the decorative quality of his choice was not always—
was, indeed very seldom—that of theirs. A successful pattern of
colour they could understand the virtue of. The Japanese, or Mr.
Whistler, had taught it them. But a successful pattern of line, they
were less capable of appreciating. They, for example, or some of
them, execrated Bouguereau, and resented in some degree the
hospitality prominently offered to that distinguished Frenchman on
the walls of the Academy. Lord Leighton, on the other hand, was,
very possibly, not fully alive to Bouguereau’s vices or failings—to his
mere smoothness, softness, not infrequent vapidness of human
expression. But he valued justly Bouguereau’s possession of the best
Academic graces, of faultless composition and subtle
draughtsmanship. For these things—these best Academic graces—he
himself strove. These, too, he generally, though not always,
attained.
In regard to this particular matter, there were times when
Leighton knew himself to be a vox clamantis in deserto. But he had
his mission. It is an immense tribute to him to recognise that any
one caring, as he undoubtedly cared, to be acceptable amongst his
fellows—amongst the younger men, even, who were some day to
succeed him—should yet have been so true to his particular
message. But Lord Leighton had an admirable courage as well as a
great patience and an untiring diligence. And there were times,
fortunately, when it was brought home to him beyond cavil, that
some educated appreciation existed of his own especial artistic
qualities, as well as of those human virtues which made him, in
many ways, so estimable a man, and so fitting a leader of men.
(Standard, 27th January 1896.)
SIR JOHN MILLAIS
For the second time within a few months the Royal Academy has lost
its chief, while English Painting is deprived of its most popular
representative, and contemporary English Art of one who was long
its most vigorous and most varied personality. Born at Southampton
in 1829, the ‘son of John William Millais, Esquire, by Mary, daughter
of Richard Evemy, Esquire’—as the official biographies relate—Millais
was really the descendant of a Jersey family of long standing; but in
character, personal and professional, he was typically English. It is
partly by reason of the fact that, as a man and as an artist, Millais
summed up some, perhaps, of the defects, many certainly of the
great qualities, of our English race, that his popularity amongst all
personal associates, and amongst the spectators of his decisive,
strenuous, and eager work, was won so early, and has been so
firmly held.
The man himself, during forty years or thereabouts of active
adult life—the artist during forty years of scarcely relaxed endeavour
—has been in thought, in conduct, in taste, and in production, pre-
eminently healthy. Millais, in the generation and a half of his active
life—for he began young—had seen fashions good and bad, foolish
and reasonable, rise and pass away; but, save by the influences of
his quite early days, the days of the Pre-Raphaelites, he has been
practically unaffected. He has developed in the direction proper to
himself. As time has passed, he and his sympathies have broadened
and modified, and if we miss in much of the later work the intense
and concentrated poetry of the earlier, that later work has qualities
of its own that do something to compensate. The man himself, too—
sportsman, man of the world, excellent comrade, hearty and sincere
good fellow—has been essentially greater in his more recent than in
his earlier times; for the temptations of a success, brilliant and
uninterrupted, did him, as a man at least, little harm. Simple and
generous he was—by all the records of his fellows—when he was at
‘Mr. Sass’s Academy’ fifty years ago. Simple and generous—generous
especially in thought and judgment as well as in action—he
remained, when in the late winter of the present year he was
appointed to the visible headship of the profession to which he had
given so much of the energy of his life.
Sir John Millais was only nine years old when he gained his first
medal at the Society of Arts—Mozart himself scarcely came before
the public in more tender years, as an executant upon the limited
keyboard of his day—and when he was seventeen, ‘Jack’ Millais was
already an exhibitor at the Academy. He was only twenty when his
‘Isabella,’ from the poem of Keats, disclosed a new talent, almost a
new order of talent; at the least, a personality that had to be
reckoned with—an influence that had to be either accepted or fought
against. Yet more marked by an artistic individuality which was, in
part, a return to older conceptions and views than those of his day,
were the ‘Carpenter’s Shop,’ ‘Mariana in the Moated Grange,’ the
‘Huguenot,’ and ‘Ophelia.’ These, or most of them, are typical Pre-
Raphaelite pictures—the offspring of the tacit rebellion of a whole
group of men, only one of whom, Mr. Holman Hunt, remains to give
effect in his later life to the principles enunciated in youth. Dante
Gabriel Rossetti—Pre-Raphaelite to the end, though of course with
certain modifications—was another of those men; but years have
passed since he went from us. The group was completed by others
never as celebrated, nor, as the world judges, so successful. They
painted their pictures; they made their illustrations; they wrote as
well as drew, in the quaint publication called The Germ, which the
lapse of time and the fad of the collector have since made rare and
valuable. Truth, rather than convention, was the aim of their
practice; but they were not peculiar in that,—all youth, if it is earnest
at all, is earnest for truth, or earnest rather for that particular side of
truth which happens just then to have been revealed, and of which it
exaggerates the value. Much has been written about the Pre-
Raphaelite ‘movement’ and its supreme importance—as if it were a
great religious Reformation and a French Revolution rolled into one.
In History it is destined to be remembered because it was a phase
through which two or three men of genius passed—a something,
moreover, that for the moment welded them together. It will not be
recollected, because at a later time mere imitative weaklings, by the
dozen, made feeble fight under what they professed to be its
banner.
The interest, then, for sensible people, in Millais’s early pictures,
lies, not in the fact that they were Pre-Raphaelite, but in the fact
that they showed, many of them, an intensity of vision, a profundity
of poetic feeling, which is the property of gifted and of eager youth.
The passionate, constant devotion—the devotion of a minute which
lasts, you feel, for a lifetime; the ‘moment eternal,’ as the great poet
puts it—of the Puritan Maiden and of the Cavalier she helps, is the
interest of the ‘Concealed Royalist.’ The burning love-affair of the
‘Huguenot’ is the interest of a canvas on which, before the days
when the aesthete had invented ‘intensity’ of attitude, Millais had
determined that his lovers should be intense, instead of sentimental.
Millais was in those years occupied very much with the presentation,
never of strictly sensuous enjoyment (Rossetti’s field, rather than
his), but of violent emotion, and uncontrolled, almost uncontrollable,
impulse. His people felt keenly, but with the elevation of poetic
natures, or of a poetic mood. And Millais painted them when their
blood ran high. He chose the incident that seemed to him the most
dramatic in all their story. He painted them on the crest of the wave
—at the moment of crisis.
This, however, like the more naïve Pre-Raphaelitism of a yet
earlier time, was but a phase—remarkable now chiefly because it
has been so absolutely outlived; nay, because so much of the view
of life taken subsequently by its author has, dominating it, a spirit so
opposed to this one. But the transition was not rapid: the ‘Autumn
Leaves’ of 1856, and the ‘Vale of Rest’ of 1860, have, at least, the
poetic quality to the full, though with no violence of emotion. Rather,
they are suggestive and reticent; weird and extraordinarily
expressive: in the one there is depicted the wistfulness of childhood,
in the other the melancholy resignation of a nun to whom ‘rest’
means brooding on a Past more eventful and more poignant than
the occupation of her present day.
Notwithstanding his later technical development, nothing that Sir
John Millais has painted will be remembered more definitely and
firmly than these; and it is noteworthy that they are among the first
pictures in which he relied in great measure upon landscape to
express or suggest the sentiment which it was the picture’s business
to convey. ‘Spring Flowers’ of 1860 was in a lighter and gayer vein, if
it is, as we believe, the picture known originally as ‘Apple Blossom’—
girls lounging in an orchard under the loaded and whitened boughs.
‘My First Sermon,’ in 1863, was more purely popular than anything
we have named. It dealt with childhood almost in the spirit of
Édouard Frère, but with its author’s singular realism of execution.
‘Vanessa,’ in 1869, marked Millais as occupied increasingly with
technical problems—with the attainment of an almost novel boldness
of effect. It is, like so many pieces of his middle and later middle
time, brilliant in colour and brush-work. No one now thinks, we
suppose, of claiming it as dramatic—that is, of connecting it
especially with the character of the lady who came off second-best
in the affections of Swift.
Very soon after the exhibition of ‘Vanessa,’ Millais, who had
already sought impressiveness in landscape background, turned to
pure landscape as a theme sufficient for the exercise of his art. He
gave us then ‘Chill October,’ the October of the north and of the
lowlands, with the wind passing over water, and the reeds and
scanty foliage bent aside by its breath. The picture excited interest.
It was visibly forcible. The conception of the scene, too, was unusual
and, of course, unconventional; but in some later landscape work,
Millais may have been at once nearer to Nature and nearer to the
attainment of a perfected art. ‘New Laid Eggs,’ in 1873, with naïveté
of expression and dexterity of handling, but with a rusticity not very
convincing, was a ‘taking’ picture of happy, healthy, self-confident
girlhood. Its importance, in the volume of its author’s work, was
quite eclipsed the following year by the ‘North-West Passage,’ a
canvas full of interest almost romantic, yet most direct in its record
of character—the main figure being, indeed, a portrait of that
Trevelyan who is associated in most men’s minds with the career of
Shelley. He it was who in Sir John Millais’s picture posed as the
sturdy sailor whose imagination engages him in a remote and
unknown voyage. When, many years after it had been painted, the
‘North-West Passage’ was seen again in the Millais Exhibition, at the
Fine Art Society’s or at the Grosvenor Gallery, it was felt that at the
moment of its execution the painter had reached the summit of his
real artistic greatness, the masculine and potent hand here best
executing that which had been prompted by a mind at its most
vigorous. ‘A Jersey Lily,’ in 1878, was a tribute to the then girlish
beauty of Mrs. Langtry, who at about the same period was recorded
by Mr. Watts with exquisite simplicity. Again, just as in his diploma
picture it had pleased Millais to invoke the name of Velasquez, and
to perform a feat such as that to which Velasquez was most wont to
address himself, so, in another canvas, in one sense more important
—that of the three Miss Armstrongs playing whist with a dummy—it
pleased him to follow visibly in the steps of Sir Joshua Reynolds—
recalling his composition; the portrait group of the three Ladies
Waldegrave being the one with which he on this occasion made it his
business to vie. In 1879 Sir John was able to exhibit one of the
masterpieces of portraiture—that record or idealisation of Mr.
Gladstone of which the nobility and charm were instantly recognised
—a canvas which of itself would be sufficient to prove that the
faculty of poetic vision never finally deserted an artist who had
seemed of late to concentrate his energy rather on dexterous
execution than on the expression of profound feeling or elevated
mood. The ‘Mr. Bright,’ which pretty closely followed the ‘Gladstone,’
was comparatively unsuccessful. And the illness of the sitter and the
consequent incompleteness of his presentation on Millais’s canvas,
made yet more disappointing the portrait of Lord Beaconsfield which
hung upon the walls of the Academy in 1881. Next year, however,
came the ‘Cardinal Newman,’ to atone for all that had been amiss—
again a poetic vision, a worthy rising to the exigencies of a great
theme, a performance at once decisive and tender, energetic, yet
exquisitely suave.

(Standard, 14th August 1896.)


BURNE-JONES
Unexpectedly and suddenly, from an attack of angina pectoris,
following upon the pest of influenza, Sir Edward Burne-Jones died
yesterday morning. He was sixty-five years old, and he looked worn
for his age—a man of delicate appearance, and certainly of great
sensitiveness; yet, as it had seemed already, of much staying power,
—a ‘creaking gate,’ as his friends thought, not so very regretfully,
since destined, in all probability, to ‘hang long.’ But now his work and
life have been arrested; the laborious days which he had lived for
forty years of manhood are for ever over, and the wan face of the
untiring craftsman, which bent eagerly over his task, and brightened
with quick sensibility in the relaxation of the social hour, is for ever
still. ‘Finis’ is written to the volume of achievement of one of the
greater practitioners in what we may call the second generation of
the English Pre-Raphaelites.
Of the first Pre-Raphaelites—of those of the first generation—
more than one changed his ways, his work, his whole conception of
Art, obviously, as time went on, and the most illustrious of them all—
Millais—was far enough removed from a Pre-Raphaelite in the end.
But of that distinguished and untiring practitioner of the second
generation, whose hold, of late years at least, upon the English and
to some extent upon the French public has become phenomenal,
though it will not be constant, it is certainly to be noted that
although there was, at different times, an unequal capacity, there
was at no time visible change in the direction of his tastes or in the
method of his work. Of the human figure Burne-Jones was not at the
first an excellent, and was never, at any time, an absolutely faultless
draughtsman. Yet the poetry of his figure-drawing, the almost
feminine tenderness with which he followed the lines of dainty
human movement, the dreamy grace that was in the place of
strength, the elegant diffuseness, so to say, which was characteristic
of his style—never even by accident tense and terse—these things
are noticeable in his earlier water-colours and in the very latest of
his performances in this year’s New Gallery. It was as a water-colour
painter that he first began to be known. A pupil of Rossetti, as far as
he was a pupil of any one, Burne-Jones was from the beginning
romantic, and he was affluent in colour.
But what, it may be asked, are the especial characteristics of Sir
Edward Burne-Jones’s art, as it has been revealed not only in the
designs for painted glass, mosaic, tapestry, in numberless pages
decorated with beautiful ornament—such as the Morris translation of
Virgil, and later, the great Chaucer—but likewise in the series of
large pictures, the adequate display of which was, so to say, one of
the raisons d’être of the old Grosvenor Gallery? He had indeed
extraordinary individuality. He was amenable to influence, for all
that; and the influence he felt the most—that of his true fellows—
was exercised by the Italians of the earlier Renaissance: a period
scarcely primitive, scarcely accomplished. Those early Italians,
though engaging, were not really great draughtsmen of the human
figure—not great draughtsmen in the sense of the Greek sculptors,
or Michael Angelo, or Raphael, or Ingres, or Leighton, or
Bouguereau. Sir Edward Burne-Jones, lacking the peculiar education
which fitted the temperament and brought out the qualities of the
men we have named last of all, not unnaturally sympathised with
those in whom intention counted sometimes for more than
execution. But it must not be thought that because the ever-
inventive artist did not possess the Academic qualities, he was not,
therefore, in certain respects, very remarkable in draughtsmanship.
He drew with the ease of conversation; and, though never a master
of accurate gesture—seldom dramatic in the representation of the
particular hour or scene—he was a master of quaint and simple, and
sometimes of elaborate, grace; and for the untiring record of the
particular type of maidenhood, seen best perhaps in the ‘Golden
Staircase,’ or in ‘Venus’s Looking-Glass,’ he stands alone. We name
those pictures rather than, for instance, the ‘Days of Creation,’ or
any of his various ‘Seasons,’ because in them he is at his happiest—
his girls, though in the work of the suave decorator they are never
essentially various, can be radiant as well as doleful. His men have
plenty of wistfulness, but they have rarely energy, strength, decision.
They are even, in a measure, sexless. And of childhood, Burne-Jones
has never been an inspired, or even, it would seem, a particularly
interested chronicler.
Of course, it must be remembered that Burne-Jones is judged
unjustly when judged by the rules of even the least narrow realism.
He painted, not the world of our own day, or of any day—least of all
the Kensington in which he lived, and slept, and had his studio—but
a world he had imagined and created; a world his conception of
which was fed, no doubt, by the earlier and graver of mid-Italian art.
Imagination, now stimulated by legend, now supported by classic
lore, and now the product of the brooding of an isolated mind—that
is really the genesis, the raison d’être, the Alpha and the Omega of
his art. Burne-Jones had, at his best, and especially in his middle
period—the days of the ‘Chant d’Amour,’ with its fitly welcomed
splendours of crimson and blue and golden brown—a wonderful gift
of colour; and, even where the draughtsmanship of the human
figure left something to be wished for, he was a marvellous, a loving,
and a patient draughtsman of flower and of herb. The backgrounds
of some of his inventions, in landscape and the architecture of
towns, were of strange and mystic quaintness. Sometimes, in these,
he recalled almost the spirit, the mystery, almost the charm, of the
backgrounds of the prints by Albert Dürer. The great Dürer!—well,
that is saying much. But we have left to the last what was perhaps
Burne-Jones’s most essential characteristic, certainly his greatest
accomplishment. We mean his gift of composition of line, his power
of precisely and perfectly filling, and never overcrowding, the space
it was his business to occupy. His composition of light and shade was
less remarkable. He was a master of agreeable outline, of flowing
and spontaneous tracery. But if it is not his imagination which is to
keep his memory green, in the minds of the students of Art—and we
doubt whether, with all his very individual merits, it really is—then it
is that in which, in all our generation, and perhaps in all our English
School, he may be accounted to have most possessed—the humbler
faculty of patterning, of weaving faultless webs of subtle line over
the surface, large or small, which was devoted to the exposition of
whatever chanced to be his theme.

(Standard, 18th June 1898.)


BOSBOOM AND HIS
CONTEMPORARIES
The English cognoscenti of the modern type have now for some time
recognised that in Dutch Art there is more than one great period
that has to be reckoned with—that the great Seventeenth Century
does not exhaust the achievements of this people. It may not be
quite true to say of Dutch painting, as of French sculpture, that the
traditions have been invariably preserved, and that there has been
little break in the school; for the last century in Holland was a barren
one—just as barren there as in France and England it was brilliant.
The revival has been for later generations, and of those who did
most to accomplish it some are yet living, in an old age not so very
advanced, and others are lately dead. A history of this revival would
be a great and worthy subject: it may yet, one hopes, be undertaken
by some one writer qualified to treat it. Such a writer could not
possibly be a person who had lived wholly within its influence. He
would have to bring with him something better and wiser than the
ungoverned admirations of the modern studio. A knowledge of the
Past must be his. Meanwhile, we receive, and experience a certain
satisfaction in receiving, even that fragmentary contribution to the
subject which is made in the volume called Dutch Painters of the
Nineteenth Century. Max Rooses—the keeper of the Musée Plantin-
Moretus at Antwerp—furnishes a general introduction, which is
readable and fairly comprehensive, if not particularly critical. And
many writers, whose collaboration is of necessity destructive of unity
of idea, but whose individual opportunities of personal knowledge
give the book something it might yet have lacked had it been written
by one serious and capable critic, contribute biographical notes,
authentic and amiable. The painters have been caressed, not
analysed. That is exactly what the least instructed and least studious
portion of the public is supposed to like, in the ‘text’ of its big
Christmas picture-books—which, of course, is why that text is
written so seldom by the serious professional writers who, if they
chose to do it at all, could do it best.
Only a dozen painters are represented in Mr. Max Rooses’
volume, and the selection of this dozen is extremely arbitrary, or
would be if it were not, as we understand, the intention of the
publishers to follow up the present with at least one other volume.
Two women figure amongst the twelve. Miss Jacoba van der Sande
Backhuysen, the aged flower-painter, who died three years ago, and
then was seventy-one, deserved probably to be included. She is
included. Some of her work is of freedom and vigour, if some also
tends to be precise and impersonal. You cannot find in every
generation or in every land a Fantin-Latour or a Francis James; and
the flowers of Jacoba van der Sande Backhuysen are generally
welcome. But the introduction of Henriette Ronner, a popular and
quite delightful lady, with the narrow speciality of painting cats, was
surely scarcely merited. As for the men, the choice is hardly less
arbitrary. Israels, of course, is in his place, with his grey record of
the homely and the sad; and, though Alma-Tadema is a naturalised
Englishman, it is not surprising that the Dutch should be reluctant to
forget what at least was his origin. But if Alma-Tadema is to be
included, why is Van Haanen—a Dutchman still, probably, and the
truest and subtlest of all living painters of Venetian life and character
—why is Van Haanen to be left out? We receive gladly what is given
us of Bisschop, Weissenbruch, and Gabriel. But the omission of such
gifted Dutchmen as Mauve and Mesdag and Artz and Mathieu Maris
—even in a first volume—is memorable. Further, the omission of the
great name of Jacob Maris—certainly one of the most potent of all
contemporary masters—would be fatal to any pretensions that the
volume might make to completeness, or, if the phrase may be
accorded us, to even a temporary finality. But if it becomes the duty
of any qualified observer to note important omissions, compelling
further instalments of the history, it must be satisfactory to him to
chronicle such inclusions as those we have already cited as welcome
and reasonable, and it is nothing less than a pleasure to find, not
only contained, but placed in the forefront of the volume, the name
and work of Johannes Bosboom. To Bosboom, and his right of place
there, we will devote our remaining comments, and partly because
the large English public is still strangely deficient in the appreciation
of his work.
Johannes Bosboom was born at the Hague in 1817. He died in
1891, aged seventy-four, and in the artistic world of Holland he had
by that time long enjoyed complete and cordial recognition; to
painters and to the best critics—above all, perhaps, to that rich
painter, M. Mesdag, collector as well as artist—belong the majority of
the best of his works. The art of Bosboom is displayed to some
extent in oil pictures, but more finely, on the whole, in the great
series of his water-colours. He is a painter essentially of the
succession of Rembrandt—a master of the arrangement of light and
shade—holding his own honourably in the presentation of landscape,
but known chiefly, and known on the whole most to his advantage,
as a painter of church interiors. His earlier work is in method drier
and smaller than his later. The maturity of his genius finds him as
broad as Cotman or Dewint. He has the restfulness and dignity of
these men when they are at their best. He has not Cotman’s gift of
colour, and in those very church interiors to which Cotman would
have given a colourist’s charm—as his kindred work in the
possession of Mr. James Reeve and the late Mr. J. J. Colman assures
us—Bosboom’s preoccupation is with tone, and with sense of space;
though, of course, in his colour he is never inharmonious. Each is
great in his own way, and the one is almost as profoundly poetic as
the other, though Bosboom, if anything, excels Cotman in the restful
picturesqueness of his vision. With him, invariably, as in the great
artist we have mentioned by the side of him, the detail is nothing
but a part of the whole. It is never aggressive; it is never
importunate; it is even for the most part effaced. Bosboom, dealing
with church interiors, is not, like Sir Wyke Bayliss, a painter of great
scenes as well as of great architecture. For him the pageant has no
attraction, and in the painting of a ceremonial or a service, such as
the ‘Taking the Sacrament in Utrecht Cathedral,’ he is not really at
his best. He is best when his church is quiet, and all its spaciousness
‘tells.’ See, for instance, the admirable ‘Church at Trier’—immense,
velvety, solemn—and, likewise, the not less masterly water-colour,
the ‘St. Joris Church at Amersfoort.’ An architectural draughtsman, in
the technical or narrow sense, he is never, from beginning to end—a
fact that is partly due to the broader and more poetic bent of his
genius, and partly, too, no doubt, to his observation having been
chiefly exercised and his imagination chiefly stirred by interiors
quaint rather than elegant, massive and large rather than exquisite
in detail, picturesque rather than perfect. The book of Mr. Max
Rooses’ editing, will, in England, have not been without its service, if
it, or even our own comments on it, should secure wider attention to
the work of a master as eminently human and sympathetic as he is
austere and sterling. But, for the fuller comprehension of Bosboom
here, in England, there should be gathered together in a single place
a fair array of his work; and we commend to the enlightened
dilettanti of the Burlington Fine Arts Club this appropriate and
honourable enterprise.

(Literature, 3rd December 1898.)


HENNER
The first thing to remember of the painter Henner is that he is above
all a poet. Has he then created stories or narrated them pathetically?
Has he made it the business of painting to do literary work? He has
done nothing of the kind. Even where he has used classical
mythology and Biblical tradition as the excuse for his canvases, the
derived subject seems to have taken hold of him but lightly; he has
been dramatic to the extent to which—well, shall I say?—to the
extent to which a reciter in a drawing-room is permissibly dramatic—
gracefully indicating action and character, never violently insisting on
them. Henner’s poetry—his gift of creating, of idealising, in
restrained and refined ways—is never shown by the usurpation of
another’s functions. It is shown in part by his choice of beautiful,
artistic themes; by the exceptional fulness of his appreciation of
lovely form and hue; by the combinations of faultless and
harmonious colour which occur upon his canvases; by the
associations these somehow evoke; by the high pleasure they
bestow. To define it much further is impossible. I feel myself, in
describing his art, to be ineffective and faltering; but the analyst
does not exist who could account completely for his charm.
Henner, it will be allowed by those who are most qualified to
notice, is a great painter of the Nude. The Nude, according as you
treat it, can rise to poetic heights and address itself to the refined, or
can sink to more than prosaic depths. There is the high and there is
the low, and there are many levels for the painter to stay at and live
upon between them; and to the real artistic instinct, to the real
fineness of taste, in looking at the Nude, there is permitted that
immediate ease of judgment and decision by which the work is
classed at once, and its motive appraised. When the true judges
appraise the Nude of Monsieur Henner, the decision is a happy one.
He is refinement to the finger-tips—as refined as Burne-Jones, yet
not sexless. Painters whom only the Puritanic could accuse of
vulgarity—Benner, say, in France, with his ‘Dormeuse’ of Amiens;
Ingres, a generation ago, with his ‘Source’ and her ‘âme végétale’;
Etty, say, in England, with his daylight flesh-colour, which the
sunshine suffers to be neither creamy nor grey, but rose and opal—
they, and how many others, may be named with praise. But
Monsieur Henner’s work has somehow, in this matter, a reticence
and a distinction—a part of his Alsatian Poetry—which one is apt to
think unique. And it is worthy of notice—it throws a little light on the
undramatic, the simply painter-like method of Henner’s work—that
the undraped figure is there, not seldom, as a necessary note of
colour, and nothing besides: a note of ivory, telling, in some picture
of evening, against that olive green of the embrowned woodland
which rises, massed and darkening, against the last turquoise of the
sky.
Yes, it is a purely painter-like quality, the poetry of colours in
that more than blameless juxtaposition which is a rare achievement
of Art—the poetry of gleaming form, of discreet light, of restful and
mysterious shadow—that Henner will live by. The story he illustrates
gains nothing in dramatic interest by his treatment of it. His
business, even when he paints an ‘Hérodiade,’ is to solace and
charm rather than to excite; and the refinement and suavity of his
vision may accomplish for us of the Nineteenth Century what David’s
music did for the troubled soul of King Saul. Like Puvis de Chavannes
—in work more grandly decorative, in conception vast and suave—he
administers to men the refreshment of a pure and high beauty. In
such a subject as his ‘Prayer,’ it is his function but to vary things
delicately: to escape the commonplace, nothing more. But, as
regards his figure painting, in the refinement of his models we are
never suffered to lose sight of what is familiar, homely, intimate,
personal. Nature has been suggested with reticence, but nature has
been constantly referred to. Of his landscape, the materials are
simple and few; breadth and simplicity are of the very essence of his
treatment. His selection is arbitrary; a certain noble conventionality
reigns in his canvases. Give him a tranquil sky, a pool, a square
stone fountain, a nymph, a solemn cypress, a tangle of woodland—
what more! Petty imitation, fussy realisation of a hundred objects,
he will hold to be valueless. But his work must have Unity: it must
have Style.
An artist with these preoccupations is not, one may say with
safety, likely to be a very popular portrait painter. Yet Henner has
painted a fair share of portraits. And no ‘hard and fast’ line can
divide such portraiture as he produces from his ideal work. When the
touches on his canvas are no longer dictated by what is obviously
imagination, it is not likely that a striking realism succeeds to the
control, that modernité speaks from every corner of the picture, that
the poet has become the fashionable portrait painter. Reticence is
still remembered. Henner can perceive character, but it must be
conveyed without emphasis. With the palette set as of old, and the
schemes of colour such as the ideal work has already accustomed us
to, Henner must pursue his task. Perhaps it is the pallor of a
thoughtful face of middle age, to be framed in black hair, with an
olive background. Perhaps, as in the ‘Créole,’ it is the old Venetian
tresses that are to fall richly on the bust that is shining marble, that
is gleaming ivory. A likeness, no doubt; but before all things, a
picture.

(Magazine of Art, May 1888.)


FRANCIS JAMES
I leave to a biographer in the Future the task of recording Mr. Francis
James’s birthplace and of settling the number of his years; of saying,
too, where he chiefly lived and chiefly practised. I am concerned
with his drawings, and not with the man, except in so far as his
drawings must reveal him; and the real man, and not the outside
facts about him, a man’s work does always to some extent reveal. In
the case of Francis James, his work is his water-colours. I know no
oil painting by him. I remember no pencil studies. I know no
etchings by him, no lithographs by him. And, moreover, modern man
though he is, he seems to be able to express himself without the
assistance of silver point—the interesting and difficult medium, the
employment of which threatens to become a label of the cultivated.
His own work in water-colour is as direct, immediate, uncorrectable
as that; but colour is of the very essence of it. Whatever he tackles,
whatever he elects to let alone, Francis James is essentially a
colourist.
One thing about his life and circumstances I shall here—taking
breath in a parenthesis—venture to record. As a youth he was never
compelled to prepare for a profession. Being a country gentleman
who gradually became an artist, Mr. Francis James had a little
comfortable means, one may suppose. Is he to be cursed, then, on
that account, with the name of amateur? Certainly not. No more
than Méryon, who was brought up in the French Navy; no more than
W. W. May, the charming marine artist, in early life a sailor, and in
late life Keeper of the Painted Hall at Greenwich; no more than
Robert Goff, who was in the Coldstream Guards; or Seymour Haden,
President of his own Academy, and once such a successful surgeon
that he might have been President of the College of Surgeons to
boot. In art of any kind—in Painting, Writing, Modelling—the spirit in
which a man does his work, and not the means that he possesses,
or the family that he belongs to, constitutes him professional or
amateur. Is his art his chief interest? If so, whatever may be his
status upon other grounds, professional artist, serious professional
artist, he is, with his books or his pictures. To the serious artist a
little money is of endless usefulness, even if it be only a very scanty
portion—three hundred a year and an umbrella—for that scanty
portion, which has caused the fool to eat the bread of idleness, has
caused the wise man to work with a will. It has gone some little way
towards securing him that deepest boon for the artistic nature, la
liberté du travail.
I suppose it was his exquisite enjoyment of flowers, as he had
lived amongst them, at all seasons of the year, in their natural place,
that gave the first impulse to Francis James to render flowers in Art.
Then, as to method in Water-colour painting, there came the
influence of Dewint, and then the influence of some, at least, of
modern French practice, and then the influence of his neighbour,
down in Sussex—that sensitive Impressionist, H. B. Brabazon, with
his mature thought upon the matter, and his delightful practice, his
‘blobs’ upon the drawing-paper—‘blobs’ which are so very few, and
are so admirably right. James has become, of late years at all
events, less purely an Impressionist than Brabazon. In his work,
whatever be its theme, there is always more of positive and yet
refined draughtsmanship. But the influence of Brabazon is there all
the same; or, at least, is there from the first. An immense
sensitiveness as to colour, a refinement of colour which does not
preclude boldness, the cultivation of an alertness as to the most
delicate gradations of colour—these things characterise Francis
James. They are of assistance to him, even of incalculable assistance
to him, in all the things that he depicts, in all the visions he realises.
But I think they are of most use to him of all when it is flowers he is
looking at; composing with grace, painting with ineffable charm.
And, so far as I understand, flowers were the subject with which
he chose to begin.
It would, however, be now thoroughly unfair to Francis James to
consider him only as a flower painter. Outside flowers altogether,
there is a class of effect which he has made his own, and which is
his by reason of his habitual command of colour—fearless, original,
and gay. I am talking of the church interiors, beheld in keen, clear
light; and interesting less it may be by their architecture—as to
which, while John Fulleylove, and Albert Goodwin, and Wyke Bayliss,
speak, who is there that shall speak with equal authority to-day?—
interesting less by their architecture than by their hues and their
illuminations, and their accidents and accessories; the ornaments
about the altar, the wreath of flowers that encircle the figure of a
saint, the bit of heraldic glass that recalls Nuremberg, the sacred
piece hoisted above the altar; the banner, it may be, or perhaps only
the pink cushion of the altar rail, or the little green curtain that gives
privacy to the box of the confessional. At Rothenburg, as well as
Nuremberg itself, Mr. James went in for very serious draughtsman’s
study of statues in their niches, of the traceried wall, of plate upon
the altar, of this and that little detail, of which the treatment
remained broad while it became finished. At Nuremberg—to name
two, that for excellent reasons I remember—admirable is the broad
and luminous picturesqueness of his interiors of the Kaiser Kapelle
and St. Sebald. At Rothenburg, as far as simple architecture is
concerned, what a variety lay before him! And yet from all its
richness and variety he turned now and then, to paint the humble
window of the little bourgeois or little tradesman’s house; the
window-sill with its few pots of green-leaved and blossoming
flowers, seen, some of them, against the brown-red shutter; fragile
fuchsia, and healthy geranium.
But whether Francis James is occupied with flower painting, or
with church interiors of Germany or the Eastern Riviera, or with
landscape pieces, or with studies of the village shop, it is always the
same spirit of broad interpretation that dominates his work. Its
business is to recall an impression—artistic always, whether beautiful
or quaint—it is not generally its business to be imitative, strictly
imitative, of actual object or scene. Quite an infinity of detail is

You might also like