0% found this document useful (0 votes)
60 views

Python Programming A Modular Approach Taneja Sheetal Kumar Naveen instant download

The document is a comprehensive guide to Python programming, focusing on a modular approach suitable for beginners. It covers fundamental concepts, control structures, functions, data structures, and applications, with an emphasis on good programming practices. The book includes numerous examples and exercises to reinforce learning and is designed for undergraduate students with no prior programming experience.

Uploaded by

llocjaenoku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Python Programming A Modular Approach Taneja Sheetal Kumar Naveen instant download

The document is a comprehensive guide to Python programming, focusing on a modular approach suitable for beginners. It covers fundamental concepts, control structures, functions, data structures, and applications, with an emphasis on good programming practices. The book includes numerous examples and exercises to reinforce learning and is designed for undergraduate students with no prior programming experience.

Uploaded by

llocjaenoku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 90

Python Programming A Modular Approach Taneja

Sheetal Kumar Naveen download

https://ebookbell.com/product/python-programming-a-modular-
approach-taneja-sheetal-kumar-naveen-53552824

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Modular Programming With Python Erik Westra

https://ebookbell.com/product/modular-programming-with-python-erik-
westra-6808794

Concepts And Semantics Of Programming Languages 2 Modular And


Objectoriented Constructs With Ocaml Python C Ada And Java 1st Edition
Therese Hardin

https://ebookbell.com/product/concepts-and-semantics-of-programming-
languages-2-modular-and-objectoriented-constructs-with-ocaml-python-c-
ada-and-java-1st-edition-therese-hardin-34071910

Python Programming A Stepbystep Guide To Learning The Language C K


Dhaliwal

https://ebookbell.com/product/python-programming-a-stepbystep-guide-
to-learning-the-language-c-k-dhaliwal-56520724

Python Programming A Practical Approach Vijay Kumar Sharma Vimal Kumar


Swati Sharma Shashwat Pathak

https://ebookbell.com/product/python-programming-a-practical-approach-
vijay-kumar-sharma-vimal-kumar-swati-sharma-shashwat-pathak-33355668
Python Programming A Practical Approach Vijay Kumar Sharma Vimal Kumar
Swati Sharma Shashwat Pathak

https://ebookbell.com/product/python-programming-a-practical-approach-
vijay-kumar-sharma-vimal-kumar-swati-sharma-shashwat-pathak-33356390

Python Programming A Comprehensive Crash Course In Python For Absolute


Beginners Peter Van Dijk

https://ebookbell.com/product/python-programming-a-comprehensive-
crash-course-in-python-for-absolute-beginners-peter-van-dijk-232059242

Python Programming A Complete Overview To Master The Art Of Data


Science From Scratch Using Python For Business Mark Whistler

https://ebookbell.com/product/python-programming-a-complete-overview-
to-master-the-art-of-data-science-from-scratch-using-python-for-
business-mark-whistler-232316866

Learn Python Programming A Beginners Guide To Learning The


Fundamentals Of Python Language To Write Efficient Highquality Code
2nd Edition Fabrizio Romano Romano

https://ebookbell.com/product/learn-python-programming-a-beginners-
guide-to-learning-the-fundamentals-of-python-language-to-write-
efficient-highquality-code-2nd-edition-fabrizio-romano-romano-33296430

Learn Python Programming A Comprehensive Uptodate And Definitive Guide


To Learning Python 4th Edition 4th Fabrizio Romano

https://ebookbell.com/product/learn-python-programming-a-
comprehensive-uptodate-and-definitive-guide-to-learning-python-4th-
edition-4th-fabrizio-romano-60610030
About Pearson
Pearson is the world’s learning company, with presence
across 70 countries worldwide. Our unique insights and
world-class expertise comes from a long history of
working closely with renowned teachers, authors and
thought leaders, as a result of which, we have emerged
as the preferred choice for millions of teachers and
learners across the world.

We believe learning opens up opportunities, creates


fulfilling careers and hence better lives. We hence
collaborate with the best of minds to deliver you
classleading products, spread across the Higher
Education and K12 spectrum.

Superior learning experience and improved outcomes


are at the heart of everything we do. This product is the
result of one such effort.

Your feedback plays a critical role in the evolution of


our products and you can contact us -
reachus@pearson.com. We look forward to it.
PYTHON PROGRAMMING: A MODULAR
APPROACH
A Modular Approach With Graphics, Database, Mobile,
and Web Applications

Sheetal Taneja
Department of Computer Science
Dyal Singh College
University of Delhi
Delhi, India
and

Naveen Kumar
Department of Computer Science
University of Delhi
Delhi, India
Contents
Foreword

Preface

About the Authors

1. Python Programming: An Introduction

1.1IDLE – An Interpreter for Python

1.2 Python Strings

1.3 Relational Operators

1.4 Logical Operators

1.5 Bitwise Operators

1.6 Variables and Assignment Statements

Assignment Statement

Shorthand Notation

1.7 Keywords

1.8 Script Mode

Summary

Exercises

2. Functions

2.1 Built-in Functions

input Function

eval Function

Composition

print Function

type Function

round Function

Type Conversion
min and max Functions

pow Function

Random Number Generation

Functions from math Module

Complete List of Built-in Functions

2.2 Function Definition and Call

Fruitful Functions vs Void Functions

Function help

Default Parameter Values

Keyword Arguments

2.3 Importing User-defined Module

2.4 Assert Statement

2.5 Command Line Arguments

Summary

Exercises

3. Control Structures

3.1 if Conditional Statement

General Form of if Conditional Statement

Conditional Expression

General Form of if-else Conditional Statement

General Form of if-elif-else Conditional Statement

Nested if-elif-else Conditional Statement

3.2 Iteration (for and while Statements)

3.2.1 for Loop

General Format of for Statement

3.2.2 while Loop

General Format of while Statement


Infinite Loops

3.2.3 while Statement vs. for Statement

3.2.4 Example: To Print Some Pictures

3.2.5 Nested Loops

3.2.6 break, continue, and pass Statements

3.2.7 Example: To Compute sin(x)

3.2.8 else Statement

Summary

Exercises

4. Debugging

4.1 Testing

An Example: Finding Maximum of Three Numbers

4.2 Debugging

Summary

Exercises

5. Scope

5.1 Objects and Object ids

5.2 Scope of Objects and Names

5.2.1 Namespaces

5.2.2 Scope

LEGB Rule

Summary

Exercises

6. Strings

6.1 Strings

6.1.1 Slicing

6.1.2 Membership

6.1.3 Built-in Functions on Strings


Function count

Functions find and rfind

Functions capitalize, title, lower, upper, and swapcase

Functions islower, isupper, and istitle

Function replace

Functions strip, lstrip, and rstrip

Functions split and partition

Function join

Functions isspace, isalpha, isdigit, and isalnum

Function startswith and endswith

Functions encode and decode

List of Functions

6.2 String Processing Examples

6.2.1 Counting the Number of Matching Characters in a Pair of Strings

6.2.2 Counting the Number of Common Characters in a Pair of Strings

6.2.3 Reversing a String

6.3 Pattern Matching

6.3.1 Some Important Definitions

Summary

Exercises

7. Mutable and Immutable Objects

7.1 Lists

7.1.1 Summary of List Operations

7.1.2 Function list

7.1.3 Functions append, extend, count, remove, index,


pop, and insert

7.1.4 Function insert

7.1.5 Function reverse


7.1.6 Functions sort and reverse

7.1.7 List Functions

7.1.8 List Comprehension

7.1.9 Lists as Arguments

7.1.10 Copying List Objects

7.1.11 map, reduce, and filter Operations on a Sequence

7.2 Sets

7.2.1 Set Functions add, update, remove, pop, and clear

7.2.2 Set Functions union, intersection, difference, and


symmetric_difference

7.2.3 Function copy

7.2.4 Subset and Superset Test

7.2.5 List of Functions

7.2.6 Finding Common Factors

7.2.7 Union and Intersection Operation on Lists

7.3 Tuples

7.3.1 Summary of Tuple Operations

7.3.2 Functions tuple and zip

7.3.3 Functions count and index

7.4 Dictionary

7.4.1 Dictionary Operations

7.4.2 Deletion

7.4.3 Function get

7.4.4 Function update

7.4.5 Function copy

7.4.6 List of Functions

7.4.7 Inverted Dictionary

Summary
Exercises

8. Recursion

8.1 Recursive Solutions for Problems on Numeric Data

8.1.1 Factorial

Iterative Approach

Recursive Approach

8.1.2 Fibonacci Sequence

Iterative Approach

Recursive Approach

8.2 Recursive Solutions for Problems on Strings

8.2.1 Length of a String

8.2.2 Reversing a String

8.2.3 Palindrome

8.3 Recursive Solutions for Problems on Lists

8.3.1 Flatten a List

8.3.2 Copy

8.3.3 Deep Copy

8.3.4 Permutation

8.4 Problem of Tower of Hanoi

Summary

Exercises

9. Files and Exceptions

9.1 File Handling

9.2 Writing Structures to a File

9.3 Errors and Exceptions

9.4 Handling Exceptions Using try…except

9.5 File Processing Example

Summary
Exercises

10. Classes I

10.1 Classes and Objects

10.2 Person: An Example of Class

10.2.1 Destructor

10.3 Class as Abstract Data Type

10.4 Date Class

Summary

Exercises

11. Classes II

11.1 Polymorphism

11.1.1 Operator Overloading

Comparing Dates

11.1.2 Function Overloading

11.2 Encapsulation, Data Hiding, and Data Abstraction

11.3 Modifier and Accessor Methods

11.4 Static Method

11.5 Adding Methods Dynamically

11.6 Composition

11.7 Inheritance

11.7.1 Single Inheritance

Scope Rule

Extending Scope of int Class Using a User Defined Class

11.7.2 Hierarchical Inheritance

11.7.3 Multiple Inheritance

11.7.4 Abstract Methods

11.7.5 Attribute Resolution Order for Inheritance

11.8 Built-in Functions for Classes


Summary

Exercises

12. List Manipulation

12.1 Sorting

12.1.1 Selection Sort

12.1.2 Bubble Sort

12.1.3 Insertion Sort

12.2 Searching

12.2.1 Linear Search

12.2.2 Binary Search

12.3 A Case Study

12.3.1 Operations for Class Section

Complete Script

12.4 More on Sorting

12.4.1 Merge Sort

12.4.2 Quick Sort

Summary

Exercises

13. Data Structures I: Stack and Queues

13.1 Stacks

13.1.1 Evaluating Arithmetic Expressions

13.1.2 Conversion of Infix Expression to Postfix Expression

13.2 Queues

Summary

Exercises

14. Data Structures II: Linked Lists

14.1 Introduction

14.2 Insertion and Deletion at the Beginning of a Linked List


14.3 Deleting a Node with a Particular Value from a Linked List

14.4 Traversing a Linked List

14.5 Maintaining Sorted Linked List While Inserting

14.6 Stack Implementation Using Linked List

14.7 Queue Implementation Using Linked List

Summary

Exercises

15. Data Structures III: Binary Search Trees

15.1 Definitions and Notations

15.2 Binary Search Tree

15.3 Traversal of Binary Search Trees

15.3.1 Inorder Traversal

15.3.2 Preorder Traversal

15.3.3 Postorder Traversal

15.3.4 Height of a Binary Tree

15.4 Building Binary Search Tree

Summary

Exercises

16. More on Recursion

16.1 Pattern within a Pattern

16.2 Generalized Eight Queens Problem

16.3 Knight's Tour Problem

16.4 Stable Marriage Problem

16.5 Fractal (Hilbert Curve and Sierpinski Triangle)

16.6 Sudoku

16.7 Guidelines on Using Recursion

Summary

Exercises
17. Graphics

17.1 2D Graphics

17.1.1 Point and Line

Axis, Title, and Label

Plotting Multiple Functions in the Same Figure

Multiple Plots

Saving Figure

17.1.2 Histogram and Pi Chart

17.1.3 Sine and Cosine Curves

17.1.4 Graphical Objects: Circle, Ellipse, Rectangle, Polygon,


and Arrow

Circle

Ellipse

Rectangle

Polygon

Arrow

17.2 3D Objects

Box

Sphere

Ring

Cylinder

Arrow

Cone

Curve

17.3 Animation – Bouncing Ball

Summary

Exercises

18. Applications of Python


18.1 Collecting Information from Twitter

Open Authentication

An Example – Collecting User Information

Collecting Followers, Friends, and Tweets of a User

Collecting Tweets Having Specific Words

18.2 Sharing Data Using Sockets

Client-Server Communication on the Same Machine – A Simple Example

An Echo Server

Accessing Web Data (Downloading a Pdf File)

18.3 Managing Databases Using Structured Query Language (SQL)

18.3.1 Database Concepts

18.3.2 Creating Database and Tables

18.3.3 Inserting Data into Table

18.3.4 Retrieving Data from Table

18.3.5 Updating Data in a Table

18.3.6 Deleting Data from Table/Deleting Table

18.4 Developing Mobile Application for Android

18.4.1 A Simple Application Containing Registration Interface

18.4.2 Tic-Tac-Toe Game

18.4.3 Running Kivy Applications on Android

18.5 Integrating Java with Python

18.5.1 Accessing Java Collections and Arrays in Python

18.5.2 Converting Python Collections to Java Collections

18.5.3 Invoking a Parameterized Java Method from Python

18.5.4 Invoking Parameterized Python Method from Java

18.6 Python Chat Application Using Kivy and Socket Programming

Summary

Exercises
Index

Colour Illustrations
Foreword
Since the early days of teaching programming languages,
the science of programming has changed substantially.
Since the times of COBOL, FORTRAN, ALGOL, C, and
ADA, Python reflects a major paradigm shift. The
classical book ‘The Art of Computer Programming’ by D.
E. Knuth changed the landscape by making
programming independent of any language. As
programmers found it hard to design structured code in
languages like FORTRAN and COBOL, subsequent
languages like C, C++, and Java provided a natural
framework for structured programming. While C++
introduced object-oriented programming as an add on
feature, Java was designed to be an object-oriented
platform independent language with extensive support
for web development. Although implemented efficiently,
Java lacks the conciseness and flexibility that the
amateur and professional programmers cherish so much.
This is where Python steps in as a language of choice.

This book ‘Python Programming: A Modular Approach’


is ideally suited for the undergraduate students who do
not have any prior exposure to programming. The
experience has shown that when the students are taught
the good programming practices later in the course, they
tend to ignore them in the programs/software they
develop subsequently. For example, it is my considered
opinion that the use of functions should be introduced as
early as possible in a programming course, and this is
where this book scores over typical programming texts.
Also, the book stresses the use of named constants and
documentation right from the beginning.

The book contains several examples that illustrate the


use of syntactic features of Python in the context of the
problem at hand. It uses Python Tutor to present the
concept of recursion and data structures in a simplified
manner. The chapter on applications is particularly
inviting as it includes examples from databases,
networking, web, and mobile technologies.

Prof. S K Gupta
Department of Computer Science and Engineering
Indian Institute of Technology Delhi
New Delhi, India
Preface
This book introduces programming concepts through
Python language. The simple syntax of Python makes it
an ideal choice for learning programming. Because of the
availability of extensive standard libraries and third-
party support, it is rapidly evolving as the preferred
programming language amongst the application
developers.

As old habits die hard, the book encourages the reader to


follow good programming practices right from the
beginning. We have tried to introduce the programming
constructs in the context of the examples that justify the
use of those constructs. We have devoted the first twelve
chapters of the book to introduce the fundamental
programming concepts. These chapters would serve as a
foundation for the advanced concepts covered later in
the book. The first three chapters cover the basic
building blocks of the Python language. We introduce the
concepts of modularity early in the book (Chapter 2) so
that it gets integrated with the student’s approach to
problem-solving. In the same spirit, we emphasize the
use of the named objects in preference to the ones hard-
coded. Further, as sound documentation is a key to the
success of any software engineering project, we
consistently document the code throughout the book,
describing the objective of each piece of the code and
how it interfaces with rest of the system under
discussion.

As the real-life problems usually require non-sequential


and repetitive execution of instructions, the discussion
on modularity in Chapter 2 has been followed by a
detailed study of control structures in Chapter 3. As
debugging is an essential skill for discovering the bugs
and making the program error-free, we have devoted a
full chapter (Chapter 4) to it. The parameter passing
mechanisms and the scope of names are fundamental
concepts in the study of a programming language, and in
Chapter 5, we discuss these concepts in detail. Chapters
6 and 7 cover the mutable and immutable objects for
storing data in a program. Often, we need to save the
data permanently in the form of files and retrieve it for
use at a later point in time. As many errors creep in
during the input/output process, in Chapter 9, we
discuss the concepts of file processing and error handling
side by side.

In Chapter 10, we introduce classes that lie at the heart


of an important programming methodology called
object-oriented programming (OOP). In Chapter 11, we
continue the discussion on classes in the context of OOP
concepts like polymorphism, encapsulation, data hiding,
data abstraction, and inheritance.

In Chapter 12, we cover basic sorting and searching


techniques, namely, insertion sort, selection sort, bubble
sort, merge sort, quick sort, and linear and binary search.
Recursion being a valuable tool for problem-solving, we
devote two chapters (Chapters 8 and 16) to it. Beginning
with the recursive functions for computing the factorial
of a number and the terms in a Fibonacci sequence, we
move on to more sophisticated problems like the tower
of Hanoi, permutation generation, list manipulation, 8-
queens problem, stable marriage problem, and plotting
Hilbert curves that demonstrate the power of recursion.
We introduce the basic data structures – stacks, queues,
linked lists, and trees (Chapters 13, 14, and 15), and show
how these data structures may be implemented
efficiently using Python.

As several applications require visualization of


information, we devote a chapter to 2D and 3D graphics,
and animation (Chapter 17). We conclude the book with
a chapter (Chapter 18) that briefly covers the application
areas such as twitter, web, database management, and
mobile app development. As a lot of application code is
developed in Java, in this chapter we also discuss, how
Python code may be seamlessly integrated with Java
code and vice-versa. Recently, Philip J. Guo of the
University of California, San Diego has made a Python
Tutor available as an opensource tool for visualizing the
execution of Python scripts, and we make use of it to
illustrate various concepts throughout the book.

ACKNOWLEDGEMENTS

We are grateful to Hitarth, first-year undergraduate


student at Dyal Singh College of University of Delhi, for
going through the entire book with great care and
suggesting dozens of subtle corrections and
modifications. We are thankful to Arpit of Amazon Inc.
for his help in identifying the suitable level of abstraction
in several chapters of the book. We are also grateful to
Prof. S K Gupta, IIT Delhi, Mr. Suraj Prakash, Director
Training, Bal Bharati group of institutions, Dr Anamika
Gupta of SS College of Business Studies, Dr Sharanjeet
Kaur of Acharya Narendra Dev College, Mr. Ashok Jain
of Sugal Infotech, and our former students Abhishek,
Ajay, Kanika, Mitul and Sunil, for their comments on
various sections of the book.

We are grateful to the entire Pearson team, especially


Ms. Neha Goomer and Mr. M. Balakrishnan who were
readily available for any help during the preparation of
the book. Ms. Neha’s suggestion to include margin notes
in the book has significantly improved the readability of
the book. Last but not the least, we would like to express
our gratitude to our family members for their support
and patience.
Sheetal Taneja
Naveen Kumar
About the Authors

Sheetal Taneja is currently working as an Assistant


Professor at Department of Computer Science, Dyal
Singh College, University of Delhi, Delhi, India. She
earned her B.Sc. (Honours) and M.Sc. degrees in
Computer Science from University of Delhi. Being the
topper in the M.Sc. programme, she was awarded a gold
medal by University of Delhi. Being passionate about
teaching, she qualified the National Eligibility Test
(NET) for university teachers while studying for the
M.Sc. degree, and joined a faculty position immediately
on completing her postgraduate studies. She is currently
pursuing her Ph.D. in Computer Science from University
of Delhi. She is a co-author of two books on information
technology, published by Central Board of Secondary
Education (CBSE). She has authored several research
articles, and has attended many national and
international workshops and conferences. She is a
member of the Association of Computing Machinery
(ACM), USA.

Naveen Kumar is a Professor at Department of


Computer Science, University of Delhi, Delhi, India. He
holds a Ph.D. degree in Computer Science from IIT,
Delhi. Prior to his doctoral studies, he earned his
M.Tech. (Computer Science) and M.Sc. (Mathematics)
degrees from IIT Delhi, and an honours degree in
Mathematics from University of Delhi. He has taught a
varied array of courses to undergraduate and
postgraduate students and has teaching experience of
about 35 years. He has supervised many Ph.D. students
in areas such as soft computing and social networks. His
current areas of interest include data analysis,
evolutionary algorithms, and parallel computing. He has
contributed several articles in national and international
journals and conferences. He has also attended many
conferences, seminars and workshops. He has been a
member of the curriculum design committees of various
universities and the CBSE. He has also been an
organizing chair/program committee member of several
workshops, conferences, and symposia. He is a member
of professional bodies like ACM, Institution of
Electronics and Telecommunication Engineers (IETE),
and Computer Society of India.
CHAPTER 1

PYTHON PROGRAMMING: AN
INTRODUCTION
CHAPTER OUTLINE
1.1 IDLE – An Interpreter for Python

1.2 Python Strings

1.3 Relational Operators

1.4 Logical Operators

1.5 Bitwise Operators

1.6 Variables and Assignment Statements

1.7 Keywords

1.8 Script Mode

Python is an interactive programming language. Simple


syntax of the language makes Python programs easy to
read and write. Python was developed by Guido Van
Rossum in 1991 at the National Research Institute for
Mathematics and Computer Science in the Netherlands.
Guido Van Rossum named Python by getting inspired
from his favourite comedy show Monty Python’s Flying
Circus.

Ever since the language was developed, it is becoming


popular day by day amongst the programmers. Various
versions of Python have been released till date ranging
from version 1.0. This book uses Python 3.6. Python is
used in various application areas such as the web,
gaming, scientific and numeric computing, text
processing, and network programming.

1.1 IDLE – AN INTERPRETER FOR PYTHON


IDLE stands for Integrated Development and Learning
Environment. Python IDLE comprises Python shell and
Python Editor. While Python shell is an interactive
interpreter, Python Editor allows us to work in script
mode. While using Python shell, we just need to type
Python code at the >>> prompt and press the enter key,
and the shell will respond with the result of the
computation. For example, when we type

Python shell displays the prompt >>> to indicate that it is waiting for a user
command

>>> print('hello world')

the text to be printed is enclosed between apostrophe marks

and press enter key, Python shell will display:

hello world

the apostrophe marks are not displayed in the output

Python shell may also be used as a calculator, for


example, when we type 18 + 5 followed by enter,
Python shell outputs the value of the expression, i.e. 23,
as shown below:

>>> 18 + 5

23

operator + acts on the operands 18 and 5


In the expression 18 + 5, + is called the operator. The
numbers, 18 and 5 on which the operator + is applied,
are called the operands. In general, an expression is a
valid combination of operators and operands. In Python,
all forms of data are called values or objects. For
example, 18, 5, and 23 are objects. The expression 18
+ 5 yields the value 23. Similarly, the expression 18 - 5
yields the value 13. The expression 18 * 5 yields 90, as
Python uses * as the symbol for the multiplication
operation. The expression 27 / 5 yields 5.4. Note that
the result of division 27 / 5 is real number. In Python,
result of division is always a real number. However, if
you wish to obtain an integer result (for example,
floor(5.4)), Python operator // (two slashes without any
intervening blank) can be used. For example, 27 // 5
yields 5. However, while using the operator //, if at least,
one of the two operands is a real number; the result is a
real number, for example, the expression 27.0 // 5
yields 5.0. Real numbers are called floating point
numbers in Computer Science terminology in view of the
floating point representation used to represent real
numbers. However, the number representation is not the
subject matter of this book. Python operator %
(percentage sign), known as modulus, yields the
remainder of the division, for example, 27 % 5 yields 2
because on dividing 27 by 5 we get 2 as the remainder.
In Fig. 1.1, we illustrate these examples in Python shell.

operators: +, -, *, /, //, %, and **


Fig. 1.1 Computation of arithmetic expressions

Python shell window

The exponentiation operator (**) yields raise to the


b 2
power operation, i.e. a . For example, 3 is expressed as
3 ** 2, and yields the value 9. Similarly, 2 ** -1
yields 0.5 as expected. The expressions in each of the
examples mentioned above involved only single
mathematical operator, but in practice, we would require
more complex expressions. Note that whereas the
expression 6 / 3 / 2 yields 1.0(= (6 / 3) / 2),
the expression 2 ** 3 ** 2 yields 512 (= 2 ** (3
** 2)). This is so because whereas the operator / (as
also +, -, *, //, %) is evaluated left to right, the
exponentiation operator is evaluated right to left. We say
that the operators, +, -, *, /, //, and %, are left
associative operators and the operator ** is right
associative. Python operator – (negation) yields negative
of the operand. For example, 10 * -5 multiplies 10
and -5 (negative of 5), yielding -50 as a result. Next, we
evaluate the foregoing expressions in Python shell:

left associative operators: +, -, *, /, //, %


right associative operator: **

>>> 3 ** 2

>>> 6 / 3 / 2

1.0

>>> 2 ** 3 ** 2

512

>>> 10 * -5

-50

- operator works as negation operator

When we enter the expression 7 + 4 * 3, the system


responds with value 19 as a result. Note that in the
expression 7 + 4 * 3, Python evaluates the operator *
before + as if the input expression was 7 + (4 * 3)
because the operator * has higher precedence than +. In
Table 1.1, we list the operators in decreasing order of
their precedence. The expressions within parentheses are
evaluated first; for example, given the expression (7 +
3) * 10 / 5, the system would yield 20.0.
Parentheses are often used to improve the readability of
an expression.

Table 1.1 Precedence of arithmetic operators

while the parentheses have the highest precedence, addition and


subtraction are at the lowest level

An error occurs when the input expression is not


correctly formed. For example, the expression 7 + 3(4
+ 5) generates an error because the operator between 3
and ( is missing:

Python complains when it encounters a wrongly formed expression

>>> 7 + 3(4 + 5)

Traceback (most recent call last):

File "<pyshell#17>", line 1, in <module>

7 + 3(4 + 5)
TypeError: 'int' object is not callable

Similarly, the expression 7 / 0 yields a zero division


error since division by zero is a meaningless operation.

>>> 7 / 0

Traceback (most recent call last):

File "<pyshell#18>", line 1, in <module>

7 / 0

ZeroDivisionError: division by zero

division by zero is a meaningless operation

1.2 PYTHON STRINGS

A string is a sequence of characters. To specify a string,


we may enclose a sequence of characters between single,
double, or triple quotes. Thus, 'Hello world', '
"Ajay " ', "what's ", '''today's "action"
plan?''' are the examples of strings. A string enclosed
in single quotes may include double quote marks and
vice versa. A string enclosed in triple quotes (also known
as docstring, i.e. documentation string) may include both
single and double quote marks and may extend over
several lines, for example:

>>> 'Hello World'

'Hello World'

>>> print('Hello World')

Hello World
>>> """Hello

What's

happening"""

"Hello\nWhat's\nhappening"

>>> print("""Hello

What's

happening""")

Hello

What's

happening

a Python string may be enclosed within single, double, or triple quotes

Note that enclosing quote marks are used only to specify


a string, and they do not form part of the string. When
we print a string using the print instruction, the value
of the string, i.e. the sequence of characters within
quotes is printed. Also, note that, within a string, \n
denotes the beginning of a new line. When a string
having \n is printed, everything after \n (excluding \n)
is printed on the next line. In this section, we shall study
basic operations on strings. Let us begin with the
concatenation operator (+), which is used to produce a
string by concatenating two strings; for example, the
expression 'hello ' + '!!' yields the string
'hello !!'. Similarly, the expression 'how' + '
are' + ' you?' yields 'how are you?' (=('how'
+ ' are') + ' you') as shown below:
>>> 'hello ' + '!!'

'hello !!'

>>> 'how' + ' are' + ' you?'

'how are you?'

escape sequence \n marks a new line

use of + as the concatenation operator

The operator * (multiplication) is used to repeat a string


a specified number of times; for example, the expression
'hello' * 5 yields the string
'hellohellohellohellohello':

>>> 'hello' * 5

'hellohellohellohellohello'

use of * operator for repeating a string several times

1.3 RELATIONAL OPERATORS

Relational operators are used for comparing two


expressions and yield True or False. In an expression
involving both arithmetic and relational operators, the
arithmetic operators have higher precedence than the
relational operators. In Table 1.2, we give a list of
relational operators
Table 1.2 Relational operators

relational operators for comparing expression values

A relational operator applied on expressions takes the


following form:

expression <comparison operator>


expression

Thus, the expressions, 23 < 25, 23 != 23, and 23


- 2.5 >= 5 * 4, yield True, False, and True,
respectively. As arithmetic operators have higher
precedence than the relational operators, the expression
23 - 2.5 >= 5 * 4 is evaluated as if it were (23 -
2.5) >= (5 * 4). When the relational operators are
applied to strings, strings are compared left to right,
character by character, based on their ASCII codes, also
called ASCII values. For example, ASCII codes of 'A'-
'Z', 'a'-'z', and '0'-'9' lie in the range [65, 90],
[97, 122], and [48, 57], respectively. Thus, 'h' > 'H'
yields True as ASCII value of 'h' (= 104) is greater than
ASCII value of 'H' (= 72). Also, 'hello' > 'Hello'
yields True since 'h' is greater than 'H'. Similarly,
'hi' > 'hello' yields True because the first
character in the two strings is identical and ASCII code of
'i' is greater than ASCII code of 'e'. Also, if a string is
a prefix of another string, the longer string will be
considered larger.

relational operators yield values: True, False

ASCII values of characters are used for string comparison

Python 3 does not allow string values to be compared with numeric values

1.4 LOGICAL OPERATORS

The logical operators not, and, and or are applied


to logical operands True and False, also called
Boolean values, and yield either True or False. The
operator not is a unary operator, i.e. it requires only one
operand. The expressions not True and not False
yield False and True, respectively. An expression
involving two Boolean operands and the and operator
yields True if both the operands are True, and False
otherwise. Similarly, an expression involving two
Boolean operands and the or operator yields True if at
least one operand is True, and False otherwise. This
is shown in Table 1.3.

combining expressions using logical operators

logical operators not, and, or yield values: True, False


Table 1.3 not, and, and or operators

Precedence of logical operators is shown in Table 1.4.

Table 1.4 Precedence of logical operators

While evaluating an expression involving an and


operator, the second sub-expression is evaluated only if
the first sub-expression yields True. For example, in the
expression (10 < 5) and ((5 / 0) < 10), since
the first sub-expression (10 < 5) yields False, and
thus determines the value of the entire expression as
False, Python does not evaluate the second sub-
expression. This is called short-circuit evaluation of
boolean expression. However, the expression (10 > 5)
and ((5 / 0) < 10) yields an error since the first
sub-expression yields True, and Python attempts to
evaluate the second sub-expression ((5 / 0) < 10)
that yields an error because division by zero is an illegal
operation:

short-circuit evaluation of a boolean expression

>>> (10 < 5) and ((5 / 0) < 10)

False

>>> (10 > 5) and ((5 / 0) < 10)

Traceback (most recent call last):

File "<pyshell#104>", line 1

(10 > 5) and ((5 / 0) < 10)

ZeroDivisionError: division by zero

Similarly, while evaluating an expression involving an or


operator, the second sub-expression is evaluated only if
the first sub-expression yields False. Thus, whereas the
expression (10 > 5) or ((5 / 0) < 10) yields
True, the expression (10 < 5) or ((5 / 0) <
10) yields an error.
To evaluate an expression comprising arithmetic,
relational, and logical operators, the operators are
applied according to precedence order for the operators
given in Table 1.5. For example, the expression not 9
== 8 and 7 + 1 != 8 or 6 < 4.5 is evaluated as
if it were the following equivalent parenthesized
expression:

expressions involving arithmetic, relational, and logical operators

((not (9 == 8)) and ((7 + 1) != 8)) or (6


< 4.5)

i.e. ((not False) and ((7 + 1) != 8)) or (6


< 4.5)

i.e. (True and ((7 + 1) != 8)) or (6 < 4.5)

i.e. (True and (8 != 8)) or (6 < 4.5)

i.e. (True and False) or (6 < 4.5)

i.e. False or (6 < 4.5)

i.e. False or False

i.e. False

expression evaluation using precedence rules


Table 1.5 Precedence of operators

1.5 BITWISE OPERATORS

Bitwise operators are the operators that operate on


integers interpreted as strings of binary digits 0 and 1,
also called bits. In Table 1.6, we list bitwise operators,
their description, along with examples. For the sake of
brevity, we assume that all numbers are eight-bit long.

bitwise operators operate bit by bit

Table 1.6 Boolean operators


Table 1.7 shows precedence order of different operators
in Python
Table 1.7 Precedence of operators

parentheses have the highest precedence while logical operators have the
lowest precedence

1.6 VARIABLES AND ASSIGNMENT STATEMENTS

Variables provide a means to name values so that they


can be used and manipulated later on. Indeed, a program
essentially carries out variable manipulations to achieve
the desired objective. For example, variables english,
maths, and commerce may be used to deal with the
marks obtained in these subjects, and the variables
totalMarks and percentage may be used to deal
with aggregate marks and the overall percentage of
marks, respectively. If a student has obtained 57 marks
in english, this may be expressed in Python using the
following statement:

>> english = 57

a variable is a name given to a value

When the above statement is executed, Python associates


the variable english with value 57. We can also say
that the the variable english is assigned the value 57,
or that the variable english refers to value 57. Such a
statement that assigns value to a variable is called an
assignment statement. In Fig. 1.2, we see that the
variable english refers to the value 57. A figure such
as Fig. 1.2 is known as reference diagram or state
diagram as it shows the current state of the variable.

assignment statement

Fig. 1.2 Current state diagram of variable english


variable english refers to value 57

In Python style (often called Pythonic style, or Pythonic


way), variables are called names, and an assignment is
called an association or a binding. Thus, we say that the
name english has been associated with the data object
57, or that the variable english has been bound to the
data object 57. Note that, unlike an expression, on the
execution of an assignment statement, IDLE does not
respond with any output. Of course, the value of the
variable english can be displayed as follows:

>>> english

57

in Python, variables are often called names

an assignment statement binds a variable to an object

In the above example, english is a variable whose value


is 57. Similarly, the following statements will assign
values 64 and 62 to the variables maths and commerce,
respectively.

>>> maths = 64

>>> commerce = 62

In this example, we assume that maximum mark in each


subject is 100. Total marks in these three subjects and
overall percentage can be computed using another
sequence of statements:

>>> totalMarks = english + maths +


commerce
>>> percentage = (totalMarks / 300) * 100

>>> percentage

61.0

computing overall percentage from marks in different subjects

Assignment Statement
As discussed above, values are assigned to variables
using an assignment statement. The syntax for
assignment statement is as follows:

variable = expression

syntax for assignment statement

where expression may yield a value such as numeric,


string, or Boolean. In an assignment statement, the
expression on the right-hand side of the equal to
operator (=) is evaluated and the value so obtained is
assigned to the variable on the left-hand side of the =
operator. We have already seen some examples of
variables. In general, we must follow the following rules
while using the variables:

rules for naming variables

A variable must begin with a letter or _ (underscore character)

A variable may contain any number of letters, digits, or underscore


characters. No other character apart from these is allowed.

Thus, marks, name, max_marks, _emp,


maxMarks, n1, and max_of_3_numbers are valid
variables. However, note that the following are not valid
variables:

total_no. #use of dot (.)

1st_number #begins with a digit

AmountIn$ #use of dollar symbol ($)

Total Amount #Presence of blank between two words

It is a good programming practice to make sure that the


variables are meaningful as carefully chosen variables
make your code readable. For example, to denote the
total marks obtained, it is easy to understand what the
variable totalMarks represents than a variable a, x,
marks or total used for the same purpose. There are
several styles of forming variables, for example:

total_marks

TotalMarks

totalMarks

TOTAL_MARKS

always use meaningful variable names

However, one must be consistent in following a style. In


this book, we prefer to use the lowerCamelCase style in
which the first letter of every word is capitalized, except
the first word which begins with a lowercase letter, for
example, totalMarks. While forming variables, it is
important to note that Python is case-sensitive. Thus,
age and Age are different variables. So, if we assign a
value to the variable age and display the value of Age,
the system will respond with an error message.
follow a consistent style in choosing variables

>>> age = 24

>>> Age

Traceback (most recent call last):

File "<pyshell#1>", line 1, in <module>

Age

NameError: name 'Age' is not defined

Python is case-sensitive.
age and Age are different names

Next, let us examine the following statements:

>>> a = 5

>>> b = a

>>> a = 7

more than one variable may refer to the same object

The first statement assigns name a to an integer value 5


as shown in Fig. 1.3(a). The next statement assigns
another name b to the same value 5 (Fig. 1.3 (b)).
Finally, the third statement assigns a different value 7 to
a (Fig. 1.3 (c)). Now the variables a and b refer to
different values.

Shorthand Notation
By now, we have seen several examples of assignment
statements. The following assignment statement updates
value of the variable a by adding 5 to the existing value.

>> a = a + 5

Fig. 1.3 Current state diagram

Alternatively, we can write the above statement as

>>> a += 5

a shorthand notation

Thus, the operator += serves as shorthand notation in


assignment statement. Similarly, the statements

>>> a = a + b + c

>>> a = a ** (b + c)

can be written as follows, respectively:

>>> a += b + c
>>> a **= b + c

As the shorthand notation works for all binary


mathematical operators,

a = a <operator> b

is equivalent to

a <operator>= b

Python also allows multiple assignments in a single


statement; for example, the following sequence of three
assignment statements

>>> msg = 'Meeting'

>>> day = 'Mon'

>>> time = '9'

may be replaced by a single statement:

>>> msg, day, time = 'Meeting', 'Mon', '9'

multiple assignments in a single statement

Thus, we can specify more variables than one on the left


side of an assignment statement, and the corresponding
number of expressions, like <expr1>, <expr2>,
..., <exprK>, on the right side. Formally, the syntax
for an assignment statement may be described as
follows:

<name1>, <name2>, ..., <nameK> = <expr1>,


<expr2>, ..., <exprK>
This notation can be used to enhance the readability of
the program. We may also assign a common value to
multiple variables, for example, the assignment
statement

>>> totalMarks = count = 0

assigning same value to multiple variables in a single statement

may be used to replace the following two assignments:

>>> totalMarks = 0

>>> count = 0

Suppose we wish to swap values of two variables, say,


num1 and num2. For this purpose, we use a variable
temp as follows:

>>> num1, num2 = 10, 20

>>> temp = num1

>>> num1 = num2

>>> num2 = temp

>>> print(num1, num2)

20 10

Note that before executing the assignment statement

num1 = num2

we save the value of the variable num1 in the variable


temp, so that the same can be assigned to the variable
num2 in the following assignment statement. A variable
that is used to hold the value of another variable
temporarily is often called temporary variable.

Alternatively, we can use the following statement to swap


the values of two variables:

>>> num1, num2 = num2, num1

1.7 KEYWORDS

Keywords are the reserved words that are already


defined by the Python for specific uses. They cannot be
used for any other purpose. Hence, make sure that none
of the names used in a program should match any of the
keywords. The list of the keywords in Python 3.6 is given
in Fig. 1.4.

keywords have special meaning

Fig. 1.4 List of Python keywords

keywords cannot be used for naming objects

1.8 SCRIPT MODE


Random documents with unrelated
content Scribd suggests to you:
XII
COLLOQUY IN THE HILLS

By the time the coffee was made, and the porridge, and Mary
had emerged from the tent, washed and brushed and sparkling, she
bethought her of the boy. “I’ll fetch him,” she told Senhouse. “He
must be fed.” Senhouse nodded, so she went back to her gîte of the
night. The boy had disappeared, and with him her cloak.
Senhouse chuckled when he heard her faltered tale. “Nature all
over—bless her free way,” he said. “She’ll lap you like a mother—and
stare you down for a trespasser within the hour. She takes her profit
where she finds it, and if she can’t find it will cry herself to sleep.
Don’t you see that you were so much to the good for our friend?
Well, what have you to regret? You warmed him, cuddled him, fed
him—and he’s gone, warmed, cuddled, and fed. You’ve been the
Bona Dea—and he’s not a bit obliged to you; very likely he thinks
you were a fool. Perhaps you were, my dear; but I tell you, fools are
the salt of the earth.”
“Yes, I know,” Mary said. “Of course I don’t mind the cloak. He
wanted it more than I did. But what will become of him—poor little
pinched boy?”
Senhouse picked up a bleached leaf of rowan—a gossamer leaf—
and showed it to her. “What will become of that, think you? It all
goes back again. Nothing is lost.” He threw it up, and watched it drift
away on the light morning wind. Then, “Come and have your
breakfast,” he bade her.
As they ate and drank she found herself talking to him of matters
which London might have shrieked to hear. But it seemed not at all
strange that Senhouse should listen calmly, or she candidly discuss
them. He had not shown the least curiosity either to find her here or
to know why she had come; in fact, after his question of “No
trouble, I hope?” and her reply, he had become absorbed in what he
had to do that day—the meal to be prepared, and the plantation of
Mariposa lilies which he was to show her. “The work of three years—
just in flower for the first time. You’re lucky in the time of your visit
—another week and you would have missed them.” But her need to
speak was imperious, and so she gave him to understand.
She told him, therefore, everything which had been implied in
former colloquies—and found him prepared to believe her. Indeed,
he told her fairly that when he had first heard from her that she was
to marry John Germain he recognized that she would not be married
at all. “Mind you,” he went on, “that need not have mattered a bit if
the good man had had any other career to open to you. It was a
question of that. You might have been his secretary, or his
confidante, or his conscience, or his housekeeper. But he’s so
damned self-contained—if you’ll forgive me for saying that—that he
and the likes of him start in life filled up with everything except
nature. There was really nothing for you to be to him except an
object of charity. Nor did he want you to be anything else. He
actually bought you, don’t you see, so that he might do his
benevolence comfortably at home. You were to be beneficiary and
admiring bystander at once. And you must have made him
extremely happy until you began to make use of his bounties, and
learn by what you had to do without them. Where was he then? It’s
like a mother with a sucking child. She makes it strong, makes a
man of it; and then, when it leaves her lap and goes to forage for
itself, she resents it. What else could she expect? What else could
Germain expect? He gives you the uses of the world; you find out
that you are a woman with parts; you proceed to exercise yourself—
and affront him mortally. I’ll warrant that man quivering all over with
mortification—but I am sure he will die sooner than let you know it.”
Her eyes shone bright. “Yes, that’s true. He is like that. Well, but
——”
Senhouse went on, speaking between pulls at his pipe. He did
not look at her; he looked at his sandalled feet.
“I may be wrong, but I do not see what you owe him that has
not been at his disposal any day these two years and a half. I
suppose, indeed, that the blessed Law would relieve you—but by
process so abominable and disgusting that a person who would seek
that way of escape would be hardly fit to be let loose on the world.
That being so, what are you to do? The fact is, Germain’s not sane.
One who misreads himself so fatally, so much at another’s expense,
is not sane. Then, I say, the world’s before you, if you have courage
enough to face the policeman. He can’t touch you, you know, but he
can stare you up and down and make you feel mean.” Then he
looked at her, kindly but coolly—as if to ask, Well, what do you make
of that? And if he saw what was behind her hot cheeks and lit eyes
he did not betray the knowledge.
She could herself hardly see him for the mist, and hardly trust
herself to speak for the trembling which possessed her. “Oh, I would
dare any scorn in the world, and face any hardships if—” but she bit
her lip at that point, and looked away; he saw tears hover at her
eyes’ brink.
Presently he asked her, “What brought you up here to see me?”
and she almost betrayed herself.
“Do you ask me that?” Her heart was like to choke her.
“Well,” said he, “yes, I do.” She schooled herself—looked down
and smoothed out the creases in her skirt.
“There’s some one—who wants me.”
“I can’t doubt it. Well?”
She spoke fast. “He has—wanted me for a long time—since
before I was married. Perhaps I have given him reason—I didn’t
mean to do that—but certainly he used to think that I belonged to
him. I was very ignorant in those days, and very stupid—and he took
notice of me, and I was pleased—so he did have some reason, I
think. Well, it all began again last year—imperceptibly; I couldn’t tell
you how. And now he thinks that I still belong to him—and when I
am with him I feel that I do. But not when I am away from him, or
alone. I am sure that he does not love me; I know that I don’t love
him. I feel humiliated by such a courtship; really, he insults me by
his very look; and so he always did, only I couldn’t see it formerly.
But now I do. I desire never to see him again—indeed, I dare not
see him; because, if I do, I know what must happen. He is stronger
than I, he is very strong. I know, I know very well that he could
make me love him if I let him. You have no conception—how could
you have? You don’t know what a woman feels when she is—when
such a man as that—makes her love him. Despair. But I must not—
no, no, I would sooner die. I could never lift up my head again.
Slavery.” She shuddered, and shut her eyes; then turned quickly to
Senhouse. “Oh, dear friend, I came to you because I was nearly lost
one night. I had all but promised. I saw your sign in the road—or
thought that I did—just in time, just in the nick of time. And when I
saw it, though I had my letter to him in my hand, telling him where
to find me the next day—Do you know, I felt so strong and
splendidly free that I posted the letter to him—and came straight
here without any check—and found you. Ah!” she said, straining her
two hands together at the full stretch of her arms, “Ah! I did well
that time. Because that very night when I was fighting for my life
you were dreaming of me.” If Senhouse had looked at her now he
would have seen what was the matter with her. But he was sunk in
his thoughts. “This fellow,” he said, broodingly, “this fellow—
Duplessis, I suppose?”
“Yes.”
“I used to know Duplessis—at Cambridge. And I’ve seen him
since. He’s not much good, you know.”
She was looking now at her hands in her lap, twisting her fingers
about, suddenly bashful.
“But I think,” Senhouse went on, in a level voice, “I think you had
better go back and face him.”
She started, she looked at him full of alarm. “Oh, don’t tell me to
do that—I implore you. Let me stay here a little while, until I’m
stronger.” He smiled, but shook his head.
“No, no. Too unconventional altogether. Really I mean what I say.
If you are to be free you must fight yourself free. There’s no other
way. Fight Germain, if it is worth your while; but fight Duplessis at
all events. That is essential. Bless you, you have only to tell him the
truth, and the thing’s done.”
She was very serious. “I assure you, it is not. He won’t care for
the truth; he won’t care what I tell him—No, don’t ask me to do
that. It’s not—kind of you.”
Senhouse got up. “Let’s go and look at my lilies,” he said. “We’ll
talk about your troubles again presently.” She jumped to her feet
and followed him down the mountain.
He led her by a scrambling path round the face of Great Gable,
and so past Kirkfell foot into Mosedale, bright as emerald. As they
neared the mountains, he showed her by name the Pillar, Steeple
and Red Pike, Windy Gap and Black Sail. High on the southern face
of the Pillar there was, he said, a plateau which none knew of but
he. To reach it was a half-hour’s walk for her; but he encouraged her
with voice and hand. There! he could tell her, at last; now she was
to look before her. They stood on a shelf which sloped gently to the
south. Mary caught her breath in wonder, and gave a little shriek of
delight. “Oh, how exquisite! Oh, how gloriously beautiful!” A cloud of
pale flowers—violet, rose, white, golden yellow—swayed and danced
in the breeze, each open-hearted to the sun on stalks so slender
that each bell seemed afloat in air—a bubble of colour; she thought
she had never seen so lovely a thing. Senhouse, peacefully
absorbing her wonder and their beauty, presently began to explain
to her what he had done. “I had seen these perfect things in
California, growing in just such a place; so when I lit on this plateau
I never rested till I got what it was plainly made for. Full south, you
see; sheltered on the east and north; good drainage, and a peaty
bottom. I had a hundred bulbs sent out, and put them in three years
ago. No flowers until this year; but they’ve grown well—there are
nearly two hundred of them out now. I’ve had to work at it though. I
covered them with bracken every autumn, and kept the ground
clean—and here they are! With luck, the tourists won’t light on them
until there are enough and to spare. They are the worst. I don’t
mind the Natural History Societies a bit; they take two or three, and
publish the find—but I can stand that, because nobody reads their
publications. The trippers take everything—or do worse. They’ll cut
the lot to the ground—flowers and leaves alike; and, you know, you
kill a bulb if you take its leaves. It can’t eat, poor thing—can’t
breathe. Now just look into one of those things—look at that white
one.” She was kneeling before the bevy, and cupped the chosen in
her two hands. “Just look at those rings of colour—flame, purple,
black, pale green. Can such a scheme as that be matched
anywhere? It’s beyond talk, beyond dreams. Now tell me, have I
done a good thing or not?”
She turned him a glowing face. “You ought to be very happy.”
He laughed. “I am happy. And so may you be when you please.”
“Ah!” she looked ruefully askance. “I don’t know—I’m not sure.
But if I am ever to be happy it will be by what you teach me.”
“My child,” said Senhouse, and put his hand on her shoulder,
“look at these things well—and then ask yourself, Is it worth while
troubling about a chap like Duplessis, while God and the Earth are
making miracles of this sort every day somewhere?” Thoughtful,
serious, sobered, she knelt on under his hand.
“Love between a man and a woman is just such a miracle—just
as lovely and fragile a thing. But there’s no doubt about it, when it
comes—and it ought not to be denied, even if it can be. When
there’s a doubt, on either side—the thing’s not to be thought of.
Love’s not appetite—Love is nature, and appetite is not nature, but a
cursed sophistication produced by all sorts of things, which we may
classify for convenience as over-eating. ‘Fed horses in the morning!’
Well, one of these days the real thing will open to you—and then
you’ll have no doubt, and no fears either. You’ll go about glorifying
God.” He felt her tremble, and instantly removed his touch from her
shoulder. He sat on the edge of the plateau with his feet dangling.
“Let’s talk of real things,” he continued after a time, “not of feelings
and symptoms. This is one of my gardens—but I can show you some
more. Above this plateau is another—just such another. I filled it
with Xiphion iris—what we call the English iris, although the fact is
that it grows in Spain. It’s done well—but is nearly over now. I just
came in for the last week of it. And of course I’ve got hepaticas and
auriculas and those sort of things all over the place—this mountain’s
an old haunt of mine. But my biggest job in Cumberland was a glade
of larkspurs in a moraine of Scawfell Pike. I surpassed myself there.
Last year they were a sight to thank God for—nine feet high some of
them, lifting up great four-foot blue torches off a patch of emerald
and gold. I lay a whole morning in the sun, looking at them—and
then I got up and worked like the devil till it was dark. . . .
“Some brutal beanfeasters from Manchester fell foul of them
soon after—fell upon them tooth and claw, trampled them out of
sight—and gave me three weeks’ hard work this spring. But they
have recovered wonderfully, and if I have luck this year I sha’n’t fear
even a Glasgow holiday let loose on them.”
She was caressing the flowers, half kneeling, half lying by them.
“Go on, please,” she said when Senhouse stopped. “Tell me of some
more gardens of yours.”
He needed no pressing, being full of his subject, and crowded
upon her his exploits, with all England for a garden-plot. To her
inexperience it seemed like a fairy tale, but to her kindling inclination
all such wonders were fuel, and he could tell her of nothing which
did not go to enhancing the magic in himself. Peonies, he told her of,
in a Cornish cove opening to the sea—a five years’ task; and a niche
on a Dartmoor tor where he had coaxed Caucasian irises to grow like
wholesome weeds. Tamarisks, like bushes afire, in a sandy bight
near Bristol—“I made the cuttings myself from slips I got in the
Landes”—Wistaria in a curtain on the outskirts of an oak wood in the
New Forest. That had been his first essay—ten years ago. “You
never saw such a sight—the trees look as if they were alight—
wrapped in mauve flames. And never touched yet—and been there
ten years!
“I’ve got the little Tuscan tulip—clusiana is its name, a pointed,
curving bud it has, striped red and white—growing well on a wooded
shore in Cornwall; I’ve got hepaticas on a Welsh mountain, a pink
cloud of them—and Pyrennean auriculas dropping like rosy wells
from a crag on the Pillar Rock. Ain’t these things worth doing? They
are worth all Chatsworth to me!”
She caught his enthusiasm; her burning face, her throbbing heart
were but flowers of his planting. Once more she was splendidly
conscious of discovery, of unsuspected distances seen from a height
and once more exulted in the strength which such knowledge gave
her. No education could have bettered this—an interest in life itself,
in work itself. All that day she laboured by his side—digging,
weeding, fetching and carrying in that sunny hollow of the hills. She
cooked his meals and waited upon him; she grimed her hands,
scratched and blistered them, tore her gown, blowsed herself, was
tired, but too happy to rest. This, this was life, indeed.
Towards dusk, after dinner, she was so tired that she could hardly
keep her eyes open; and Senhouse who had been watching her with
shrewd amusement, bade her to bed. The tent was at her disposal,
while she remained. Slowly she obeyed him, unwillingly but without
question. The day was fading to a lovely close; night, as it were, was
drawing violet curtains over the dome of the sky. The great hills
were intensely dark, and the valley between them and below lay
shrouded in a light veil of mist. It was so quiet that they could hear
the Lingmell beck crisping over the pebbles or swishing between the
great boulders; and once a fish leapt in a pool, and the splash he
made was like a smack on the cheek.
Mary obeyed slowly. She stood behind him where he sat
watching all the still wonder of the dusk, hoping he would speak,
afraid herself to break the spell of her own thoughts. She was
excited, she felt the exquisite luxury of ease after toil; if she had
dared she would have indulged her quivering senses. She could
deceive herself no more; she had no need in the world which
Senhouse could not satisfy, and no chance of happiness unless he
did. But she respected him more than she loved him; it never
entered her head for a moment that it would be possible for her to
draw such a man on. Still she stayed, as if unable to leave him; his
mere neighbourhood was balm to her fever.
So they remained for some unmeasured time, while the silence
became crushing and the dark blotted out hill and hollow. She could
not hear her heart beating, and the pulses in her temples. In a
manner she was rapt in an ecstasy: she thought no more; she was
possessed; her happiness was at the point of bliss.
Senhouse sat on, motionless, he, too, absorbed in contemplation
—like a priest before his altar-miracles. He may not have known that
she was so close to him; or he may have known it very well. If he
did, he showed no sign of it. His thoughts, whatever they were, held
him, as he sat, his chin between his clasped knees, rigid as a dead
Viking, crouched so in his tomb of stones. His black, glazed eyes
were fixed sombrely towards the shrouded valley—across it, to the
mountains beyond. So at last, when her pleasure became a pain so
piercing that, had it endured much longer, she must have cried
aloud, she shivered as she clasped her hands together over her
breast—and then lightly let one fall to touch his shoulder.
She must needs speak to him now. “Do you wish me to go?”
He answered shortly. “It will be better. Yes, you had better go.”
“Very well—I will. But to-morrow? Am I to go home to-morrow? I
shall do exactly what you tell me. You know that.”
He did not move, nor answer her immediately. She hung upon his
silence.
Then he said, “I’m a man, you know—and you’re a woman.
There’s no getting away from that.”
“And you wish me——?”
“I’m a compromise—by my own act. This is Halfway House. You
may rest here, you see—and go on—or go back.”
She could school her voice, but not her hand which touched his
shoulder. She had to move it away before she spoke. “And if I decide
—to go on?”
“You must not—until you know what it means. Some day—
possibly—when you see—not feel—your way, it may be— Look here,”
he said abruptly, “we won’t talk about all this. I told you—in cold
blood—what I thought you ought to do. Go back and see Duplessis.
Don’t ask me to reconsider that—in hot blood. I’m not myself at this
time of night. I saw straight enough when you put it to me. I value
your friendship—I’m proud of it. More I must not say. It is something
to have made a woman like you trust me. That’s too good a thing to
lose, do you see? And I’ll tell you this, too—that you may trust me.
If you do as I tell you, it will work out all right.”
“Yes, yes—I believe that. But you told me this morning to follow
—my heart.”
“I did, my dear, and I meant it. But not what your heart calls out
at midnight.”
She stood where she was a little longer; presently she sighed.
“I will do as you bid me—because you bid me;” and he laughed.
“Reason most womanish.”
“Don’t laugh at me just now,” she said.
He folded his arms tightly, and stooped his head towards them.
“I daren’t do anything else,” he told her; “and I will not.”
In the dark she stretched out her hands to him; but soon she
gave over, and gloried in the strength he had.
“Good-night,” she said; and he answered her without moving,
“Good-night.”
She stole away to his tent; but he sat on where he was, far into
the night.
In the morning light they met as if nothing had happened; and
after breakfast he took her by Wastwater to Seascale—to the train
for the south. He was the old informal, chatty companion, full of
queer knowledge and outspoken reflections. He told her his plans, so
far as he could foresee them. He should be going to Cornwall in
November.
Then he put her in the train, and touched her hand lightly, as his
way was. He looked into her face, and smiled half ruefully. “Don’t
forget Halfway House,” he told her. She could only sob, “Oh, no! Oh,
never, never!” He turned away—waited for the train to move—then
waved his hand. As the train carried her under the arch, and bent on
its course, she had her last glimpse. He stood, white and slim,
against the grey buildings. She waved her hand, and was carried
onwards to the south.
XIII
THE SUMMONS

She knew now that she loved Senhouse, and that knowledge
filled her with indescribable triumph, and gave her unimagined
strength. At the same time, the quietude of her new joy really
amazed her. She could lie back in her corner seat of the train and
watch her flight to the south, be conscious that every thresh of the
great driving wheels was taking her from her beloved, reflect that
she could neither write to him nor hear from him—wanderer that he
was, and sojourner in tents—and regret nothing, and long for
nothing more tangible than she possessed already. He had her
heart; she had made her surrender on that night of intense colloquy.
That had been her true bridal night—by that mysterious intercourse
she had become his irrevocably. A great security possessed her, a
conviction, which it would have been blasphemous to question, that
all was well. If one had told her, you and he may never meet again,
she would have laughed in his face at the absurdity. Such a thing
was not worth argument, spelt its own refutation.
An immense content possessed her, a security which excused her
from looking back, and made the future indifferent. She thought
neither of her husband with remorse nor of Duplessis with
apprehension. She was not appalled by the flatness of her
immediate prospect: of a return to town and its round of flurry,
chatter, and dress; of Southover and its autumn rites. These things
were shadows of life: the real life was hidden in her heart. She
would send her tricked-out body to dinner-parties and other
assemblies of dolls, while she herself would be elsewhere, in some
blue immensity of air, breasting some great hill, breathing the breath
—which was food—of her mother the Earth—her mother! Their
mother! She and her beloved were brother and sister. Entertainment
here, for the flying miles, to which the threshing wheels lent
processional music.
If she hardly knew herself it is no wonder. She crossed London
by rote, reached Blackheath, walked sedately to her father’s little
house, entered the little dull door, and kissed her parents, whom she
found at tea—all in a dream. They made much of her, the great lady
she was become; found it not amiss that she appeared in tumbled
gown, with soiled blouse, and hat remarkable for its
unremarkableness. Great ladies could do as they pleased, being a
law unto themselves. Nor were they confused by her replies to the
proper inquiries. “Mr. Germain?” she said, “I think he’s very well. I
haven’t seen him since I left London. We don’t see much of each
other, you know, Mother.” A stack of forwarded letters was indicated,
telegrams among them. She nodded her head, and passed her cup
for some more tea.
She heard of the girls’ progress—all out in good boarding schools
of her providing; next of Jinny’s triumphs in the Lincolnshire home of
the Podmores. “Jinny has a bold way with her, as you know, Mary.
They were not inclined towards her at first. There was a question
whether she should not pack up her box again the day after she got
there—but Mr. Podmore—her Mr. Podmore—went on his knees, on
his knees, Mary—and she consented to stay. Very bold of Jinny,
considering that old Mr. Podmore is a Rural Dean——”
Mary smiled. The simple talk went on. By-and-by it came out that
a visitor had called to see Mary several times—a Mr. Duplessis, a
very tall young man. “He came here the evening we had expected
you, and I thought the chimney was afire when I heard his knock.
Exactly like the fire brigade. I opened the door in a twitter—and
there he was—six feet-two of him, and a tall hat atop of that. “Is
Mrs. Germain at home?” he asks me, and I say, “She may be, for
she’s not here.” Then he says, “You are Mrs. Middleham, I take it.” I
tell him he takes me rightly. “Don’t you expect your—Mrs. Germain?”
I told him the truth. “I’ll call to-morrow,” he says—“and he did, Mary,
and to-day, too. A handsome, upstanding young man—very much at
home with the likes of me. I suppose—but you know your own
business best, of course.”
Mary stroked her mother’s cheek. “Dear little old Mother,” she
said, “I know you’re afraid for me. Mr. Duplessis is quite harmless.
I’ll see him, if he comes to-morrow.”
In the intervals of housework—for she insisted upon being useful
—she wrote to her husband from day to day, telling him in her first
letter that she had been unable to write before as she had been
travelling. On this particular information he made no comment
whatsoever; indeed, he confined himself to such generalities as the
state of the weather, his cold, “which, under medical advice, I am
nursing at home,” and the proceedings of Mrs. James. “Constantia is
a great comfort to me. You will be pleased to hear that I am not
without hope of inducing her to prolong her visit. She speaks very
kindly of you. My brother, I regret to say, has been called home by
parochial cares. . . . The Cantacutes dined here last evening. I
regretted that I could not be down to receive them. However,
Constantia. . . .” She replied pleasantly to all this, feeling not one
grain of discomfort out of anything which Mrs. James could or could
not do. She begged to be kept informed of his cold. “You know that
I will come to you the moment you care to have me.” In answer to
that, by return of post, he wrote that “on no account” must she alter
her plans. “Believe me, I am fully contented that you should be with
your parents. It is, I understand, reckoned a failing of the past
generation that children should admit any claim in them who bore
and nurtured them. Personally, I do not pretend to be abreast of the
times in this particular; nor should I wish you to be so. I am assured
that there is no cause for uneasiness on my account, and will most
certainly see that you are kept supplied with bulletins. I beg my
sincere respects to your father and mother.”
After that she heard nothing more from him.
Duplessis had called two days after her arrival, but she had been
out, and he had not waited. He came again after three days’ interval
—having written to announce his intention—at 11 o’clock in the
morning. She was on her knees, in pinned-up skirt and apron, her
arms bare to the elbows, scrubbing the kitchen floor, when his knock
resounded through the house. The quick blood leapt into her cheeks,
but she held to her task. Her mother came fluttering in. “That’s your
visitor, Mary. What am I to do?—and you in such a state!”
“Show him in here, Mother,” says Mary.
“Never, child. He’ll think you demented.”
Mary was inflexible; her eyes glittered. “I shall see him nowhere
else,” she said.
Upon his second attack, a scared and serious Mrs. Middleham
opened the door. Mary, pausing in her scrubbing, heard the dialogue.
“Oh, good-morning. Mrs. Germain?”
“My daughter is here, Sir.”
“Oh, she’s come, has she? Do you think she would see me?”
“She says so, Sir. I have asked her. But she hopes you will excuse
her untidiness——”
“Oh, of course——”
“She has been kind enough to help us here—she is at work now.
You will please to overlook——”
“My dear Mrs. Middleham——”
“If you will follow me I will show you where she is.”
Mary rose from her knees to receive him, having wiped her hands
and arms on her apron. Her cheeks were burning and her eyes alight
—but she looked none the worse, assuredly, for that.
When Duplessis, stooping his fair head, entered the kitchen, she
came forward lightly to receive him. “Good-morning,” she said. “You
will take me as I am?”
“I’ll take you how I can,” said Tristram, shaking hands. “Your
mother prepared me for this attack of industry. You might let me
help you.”
Mary laughed. “Don’t destroy my mother’s illusions. She is
convinced of the complete idleness of the upper classes. If she lost
that she would have to alter all her ideas of society.”
“I don’t know anything about the upper classes; but Mrs.
Middleham can have no notion how hard I can work,” Duplessis said.
“I was at it all last night. Dancing till Heaven knows when.”
“I’ll warrant Heaven does,” said Mrs. Middleham to herself. She
was not able to find anything to say to this magnificent visitor.
Duplessis and Mary made a fairer show, for she had learned to
dread, with the high world, a single second of awkwardness. She
was even able to continue her work on her knees and chat with
Tristram, who, for his part, sat calmly on the kitchen table and talked
nineteen to the dozen. It is difficult to say which side of this simple
performance scandalized Mrs. Middleham the more—that Mary
should be on her knees with a scrubbing brush, or that Duplessis
should not be. The good blunt woman sat it out as long as her
endurance would last, growing more and more stiff in the back,
primming her lips in and in until she showed none at all. Finally she
rose with a “You will excuse me,” and stalked out of her own
kitchen. She sat in the empty parlour and looked at a photograph
album as a protest. Meanwhile Mary’s hour had come. It had been
on the edge of her tongue to ask her mother to stay—but she had
dismissed the thought as unworthy. She fixed her mind upon the
plateau of Mariposa lilies, and her eyes on her work, and scrubbed
for life.
“Molly,” said Duplessis, “why did you run away from me?”
She elbowed her brush stoutly. “Because I was afraid of you,” she
said—then stopped and looked up at him. “But I’m not now—not in
the least afraid.”
“You need not be. You wrote to me that you were coming on the
13th.”
“I know.”
“And this is the 20th, and you are only just here.”
“No. I have been here four or five days.”
“Where were you—when you were not here?”
“I was travelling.”
“Travelling!”
“Yes. But I decline to be questioned.”
“You mean, I suppose, that you will decline to answer.”
Her colour rose. “You always correct my language, I know. My
exact meaning is that I deny your right to question me about my
own affairs.”
“But if they are my affairs, too? May I not know what you are
doing with them?”
She thought. “Yes—I suppose you may do that.”
“Very well. Then I will ask you why you sent me word that you
were to come here on the 13th ‘by train,’ and then did nothing of the
sort?”
On her knees still, she faced him with her answer. “Yes, I will
answer that. When I wrote, I intended to come—and expected that
you would meet me. But when I posted the letter I had changed my
mind. I did not intend to come.”
He stared, with very cold, bright eyes. “You did not intend to
come when you posted the letter? Pray, did you intend me to expect
you at the station?”
She answered him, “Yes, I did expect it.”
He raised his eyebrows. “Really, my dear friend, you interest me
extremely. Did you think that six hours or more at Charing Cross
Station would be good for my nerves, morals, or constitution?”
“I will tell you what I thought,” she said. “I thought that waiting
at Charing Cross would be no worse—to say the least—for a man
than an appointment in Burlington Arcade could be for a woman.”
Duplessis bit his cheek. “That was your gentle reproof, then, for
my blunder?”
“Yours was only a blunder because I saw what it really was. It
had never entered your head that I could be other than honoured to
meet you anywhere. You presumed that I should run there.”
“You ran very near to it, my friend,” he said. “That is, you had
yourself driven.”
She bowed her head. “I admit it. I was a fool—but I am not a
fool now.”
“No,” said Duplessis, “you are not. You are, as a matter of truth,
extraordinarily beautiful just now, and I am more ridiculously in love
with you than ever. But—” She rose from her knees and stood before
him.
“Let me finish what I have to say to you, please,” she said. “That
was not my only reason for deceiving you. I wished you to wait for
me in vain, because I wished you to understand that I could not see
you any more. I wished you to believe that our intercourse must be
over. I chose the harshest means I could think of. I might have
written it, no doubt, but you would have answered the letter, and I
am no match for you in writing. I might have seen you and told you
—but I couldn’t do that.”
“Molly,” said Duplessis, folding his arms, “why couldn’t you see
me?”
She looked down. “Because I couldn’t.”
“It was because you dared not,” said Duplessis.
She did not answer; she was trembling a little now, and he saw
it. But presently she looked him straight in the face.
“Yes,” she said, “that is true. I did not dare.” He laughed gaily
and started forward to take her; but she put her hand up.
“No,” she said, “you are mistaken. I dared not then, but now I
dare. I can meet you now whenever you please, and have no fear at
all.”
Duplessis, red in the face, scowled and watched her from under
savage brows. “Am I to understand by that that you have ceased to
care?”
“You must understand that I do not love you.”
He left the table where he had been sitting and took a turn about
the room. Presently he stopped in front of her. His height gave him
great advantage.
“I decline to take that answer. I cannot believe that you mean it
seriously. I think that you loved me two, nearly three years ago, and
that you have loved me of late since last October—some nine
months. I know that I have never for a moment ceased to love you.
Through your engagement—horrible entanglement as it was—
through your years of married life—miserable eclipse—my love has
gone on, my need has increased. You know that; you cannot doubt
me. It was not my doing that you were false to our love; I couldn’t
interfere; it was begun without my suspicion, and all the mischief
done before I could get home. After that I did my honest best to get
on without you—and then your fool of a husband must drag me in.
What next? The inevitable, the undoubted. We two were drawn
together: it had to be. And now you ask me to believe that—for no
reason at all—it must stop. My dear girl, you can’t swap horses
crossing the stream, you know. I decline to be switched off like so
much electric current. Who’s the other man?”
This surprising turn to his speech nearly threw her off her
pedestal. But she could answer him truthfully.
“There is no question of caprice or of other people at all. The real
truth is that I have grown wiser. I know now that I was losing my
self-respect by permitting you to love me as you did—in the manner
you saw fit to use. It was not love at all—you had got into the habit
of considering me as your property, and you could not bear that
anybody else should claim a right to me. Directly I saw that, I knew
that I couldn’t allow myself to think of you, to be with you—if I was
to be—if I could hope to hold up my head.”
He was very angry. “May I know what, or who, enabled you to
see this unfortunate aspect of my affairs?”
“I can’t tell you that,” she said. “It came to me suddenly. I think
your asking me to meet you in such an extraordinary place had
something to do with it.”
“I beg your pardon for that,” he said at once. “Honestly and
sincerely I am ashamed of that. Only it is fair to say that I meant no
possible disrespect to you. I couldn’t well meet you in your own
house. The weather was beastly—I thought we could discuss our
plans—and might as well do it under a glass cover as under
umbrellas. We might have been there five minutes. Really, I can’t
admit that the base is broad enough to hold all the superstructure.”
“It was nothing,” she admitted; “I was only offended for a
moment—and of course if I had still been nursery governess I
should have gone, without a question. I should have been flattered,
I am sure. But—ah, surely you can be honest with yourself, surely
you know what it is you want of me. Why, if I could bring myself—
would it be worthy of you to—?” She broke off, impatient at the
hopelessness of convincing him. “Mr. Duplessis,” she said, and he
frowned at the style, “I have been wicked, I think—at least, I have
been so foolish that I can hardly believe it was I. I am sure you
won’t be so ungenerous as to pin me down to a mistake. I beg you
to take what I say now—as I mean it.”
Looking up at him, she saw that she had made no way. The more
she said, she could see, the greater the fire in the man. He stooped
right over her, and she could hear the fever in his voice.
“My love, my adorable love—I shall never give you up—never—
never——”
She cowered. “Ah, be merciful——”
He said, “My mercy shall be my love and service”—and took her
hands.
She strained away—she turned her head—“No, no,” she
murmured, “I implore you.” But he drew her in—“My beloved—my
darling——”
The street knocker clamoured—a double call—and as he started
she sprang back to the wall, and gained the door. She went down
the passage and met her mother with a telegram in her hand. “For
you, Mary. No bad news, I hope.”
Mary read. “Think it would be well if you could come to-day.—
Constantia Germain.”
She had not heard from Hill-street for three days. Yes, certainly
she must go.
“Mother, I must go home immediately. Mr. Duplessis will take me.
I’ll tell him to wait.”
She returned to the kitchen; Duplessis was biting his cheek
leaning against the table with folded arms. His breath was still quick.
“Mr. Duplessis,” said she, “I have had a telegram from home—
from Mrs. James. My husband is ill and I must go to him. Will you
take me, please?”
He jumped forward. “Of course. I’m very sorry. I’ll do everything.
Go and get ready—I’ll find a cab.”
XIV
VIGIL

A shadow, not hers, which moved, kept Mary silently employed.


She was watching it. She was not conscious of having spoken a
single word from the moment of farewell to her mother until her
arrival at Hill-street. Duplessis had accompanied her from door to
door. She cannot have been aware of it, or she would have
dismissed him at Victoria.
Not that he had been obtrusive—far otherwise. He saw to
everything, and what conversation there had been, he had made it.
She might have been grateful to him for all this, had she observed it.
Once only had a cry escaped her. “He is dying. He will die thinking
me wicked. What shall I do?”
He had answered her. “No. He is a just man. You have nothing
you need fear to tell him.”
“He is dying,” she repeated, her eyes fixed upon the dun waste of
houses and chimney-stacks. Duplessis could not doubt this. It
seemed as certain to him as to her. He, too, discerned the moving
shadow.
As he helped her out of the cab in Hill-street the carriage came
quickly up and the Rector of Misperton in it. He and she met on the
pavement. Duplessis lifted his hat, re-entered the cab and departed
—seen, therefore, by the Rector, by Musters, and the carriage-
groom, and by the stately butler and his familiar at the open door.
She and James Germain went up the steps without greeting. As she
went straightforward to the stairs she heard the Rector’s inquiry,
“Well, Greatorex?” and Greatorex’s reply, “The doctors are there, Sir.
There is no change.”
She went lightly up the stair, to the door of her husband’s room;
she knocked lightly. A nurse opened. “Who is it, please! I don’t think
——”
“I am Mrs. Germain. I must come in.”
Mrs. James, the doctrine of the Soul’s immortality lambent upon
her features, stood by the window talking in whispers to a great
physician. Another, equally imposing, was by the bed, his hand on
the sick man’s pulse. At Mary’s entry the lady broke away and came
towards her. The light of conflict was in her eyes, tight upon her lips;
she was prepared for reproof in any form—but none came. Mary did
not see her. She walked past her on tiptoe, to the edge of the bed,
and sat herself in a chair which stood there, and looked at the
shadow which was not her own. It hovered, now, moved no more.
Sir Lambton Tweedale, his investigation ended, joined his colleague
by the window.
Mary thought that he was dead. He lay on his back with nearly
closed eyes, and she could discern no movement for breath. His face
was colourless, and so frail, so diaphanous did he look, she thought
that she could see the colour of his eyes through the lids, a haunting
thought. He seemed to be watching her through them, as if they
were a thin veil—to be reading her, whether guilty or not. Of pity for
him lying there so noble, so patient, and so fordone; of awe before
his remoteness from her lot, his immortal indifference; of remorse
for what had been, or a shudder for what might have been—she had
none. But her eyes watched him intently, with a new power in them,
a fierce and feverish light—as if she had the will and the means to
draw the dead back to life. For one half-hour only, to fulfil one need.
He must hear her tell him her story; and then he might die in peace.
One of the great pair came to where she sat on the watch, and
bowed. “Mrs. Germain, I think?”
She nodded sharply, without turning her eyes.
“I could—we could—have wished that you had received earlier
notice of this serious turn. It seems to have been Mr. Germain’s
express desire that you should not be needlessly alarmed. He was
perfectly conscious and master of himself twenty-four hours ago. But
a great change took place yesterday afternoon, it appears. Neither
Sir Lambton nor myself can be held answerable for——”
She stopped him by an impatient movement of her head. “Do
you think he is—in danger?”
“Undoubtedly. It is right that you should know that it is serious.”
“He will die?”
“Ah, we must not say that.”
She looked him through and through. “Then he is not dead?”
“No, no.”
“Thank you. That is all I want to know.”
The learned pair went out together and Mrs. James with them.
The nurse remained—to drink her tea and hover. She was very ready
with whispers; but Mary sat, with fixed, intense eyes, willing her
husband to live, and asked for no details. By-and-by the Rector
came in on noiseless feet and stood by her. Between these two there
had always been sympathy; generosity on his part repaid with
gratitude on hers. But now she would not turn her head. Nor even,
when she felt his hand touch gently on her shoulder and stay there,
could she bring herself to acknowledge the kindly act.
He remained by her so for a long time. Then, “My child,” he said,
“have you had any tea?”
She shook her head. “No, thank you. I don’t want any.”
“It could be brought you here.”
“No, thank you.”
“You must be brave, Mary.”
Ah, she knew that! “I must, indeed,” she said.
“Remember, please, that I knew of this no sooner than you did.”
She started, she flushed. What did this mean, then? Was it
possible that Mrs. James—for reasons—Ah, and if it was, did it
matter? Did anything matter? Only one thing—and that was of her
provision. She resumed her hungry, patient watch.
The Rector still stood by her, his hand on her shoulder.
“Be patient, my dear. Trust the future to the good God.”
She said, “I do. But he will not die yet. I am sure.”
“Ah, my dear—” he began, in his despair. But she spoke on
vehemently.
“He cannot—he will not. He will know me again presently—and
speak to me. That is necessary for us both. We have things to talk
about. Then he will die.”
The Rector shrank. “You talk strangely. What do we know? My
dear old brother! . . . Will you not come and rest—after your—?” He
stopped there, and she understood his reason.
“I’m not at all tired,” she told him. “I shall sit here until he wakes,
and knows me. I can rest here quite well. I don’t want any food or
anything.” The Rector urged her no more, and presently left her.
She sat on through the dinner-hour, the change of nurses,
motionless and absorbed. Once the patient stirred, sighed, muttered
with his lips. Listening to him, breathless herself, she could now hear
his breath—so short and light it was that she must have overlooked
it all these hours. From this time onwards through the ministrations
of the night-nurse, through visits of the Rector, through ominous
absence of visits from the Rector’s wife, through the bustling entry
of Dr. Goodlake and his voluble explanations—double pneumonia—
absence of will-effort—and the like—she was in a fever of hope and
anticipation, waiting, like one tense at the starting-post, for the
signal.
At midnight Mr. Germain stirred and began to moan, regularly,
hopelessly, in a way to break your heart. This, too, her certainty
gave her the heart to endure. Such nourishment as he could be
given set him wandering. He spoke ramblingly—often of her—cited
scripture—“My darling from the lions,” she caught; and “the lion and
the dragon shalt thou tread under thy feet.” Once he cried aloud,
“Ha! Tell Wilbraham I will not see him—” and again, moaning, “No,
no, it is untrue—it cannot be true.” There followed a time of broken
sleep—at three o’clock, with a grey line of light between the
curtains, she saw his open eyes fixed earnestly upon her.
She was on her knees by the bed in a moment. “I am here,” she
said. “Do you know me?”
His lips moved, “Yes.”
“I was at home when I heard of your illness—but I did not go
home when I left you. I went to the north to consult a friend—about
myself. Do you hear me? Can you hear me?”
Again he sighed “Yes.” His eyes were fixed upon hers—with
interest, she thought—but without any judgment. The night-nurse
discreetly left the room.
She asked his patience, and plunged into her story—her story
and his own, with Tristram’s part interwoven. “There was one who
used to see me,” was her way of bringing in Duplessis, and after that
Tristram was “he” throughout. She would not use his name; felt she
could not, and knew that she need not. Full understanding lay
behind those unwinking, charged eyes, terribly watchful and
indifferent to anything but curiosity. She saw them as the patient
eyes of an investigator, expectant of a final experiment. “I have
studied this case for three years—now, at last, I am to have it.” He
knew everything—had known everything from the beginning: she
had no news for him; “how she would put it,” was what he was
waiting for—for that only she had drawn him back to life.
This knowledge, this realization drove her to candour past belief.
She felt as if she was stripping herself for public exhibition—found
herself talking in a dry voice of lovers’ intimacies and of still more
secret things—of things which women feel but do not even think.
She had to examine herself unflinchingly during this confession,
which reduced itself, for lack of matter, to one of motives. In the
course of it she had to face a fact never faced before only felt. She
could not love Tristram, she did not love Germain—whom, then, did
she love? The fine colour flushed her cheeks, the true light flamed in
her eyes as she told herself—and then told her husband.
“I know myself now. There is one man who could do with me as
he pleased. But he will do nothing with me. I trust him utterly; he
has changed me. He has given me a soul, I think. He has taught me
the worth of things which I never valued before; and what life is,
and happiness, and truth. It is through him that I went home and
faced what I was afraid of—left him and all the wonderful things he
could make me see. I might never see him again—but I left him. I
am doing what he would wish now in telling you all this. Untruth is
impossible to him, and must never be possible to me again. That is
why I have waited here to tell you. I had to tell you—I had to tell
myself. Now I have told you everything——”
She stopped there because she felt that if she were to go on she
would have to be insincere. Contrition for what she had done and
allowed to be done in the days of her blank ignorance, prayers for
forgiveness, promises of amendment—such things, proper for
bedside confession—what would they imply, what involve? That she
loved this poor watcher? Alas! Pity might have urged her to deceive
him so; but she dared not deceive him—and, moreover, she was
certain that he could not now be deceived. The light of another
world shone upon him, shone through him, and enabled him to read
hearts. She did not shrink from this supernatural power of his—if it
had been profitable she would have given him her life-blood. It
seemed to her as clear as daylight that the utmost she could do for
him had now been done—when she had discharged her conscience
before him, and cleared her honour. She believed that he would feel
himself honoured by that act; and as she stooped over him to kiss
him she told him as much.
“It is kind of you to have listened to me. You have done me so
much honour, so much kindness—but this is the greatest you have
ever done me. Do you understand that I feel it so?” For a moment
his terrible intelligence pored upon her as she hung over his bed. It
searched her, explored her, wondered, judged. A flicker of a smile—a
momentary relaxation of his rigid lips—a faint wavering of his
attention; then he signed, and closed his eyelids down. The strain
was over, she had been heard, assessed, acquitted. When the night-
nurse came in she found the patient at peace, and Mary Germain
crouched on the floor asleep, her head upon the edge of the bed.
XV
THE DEAD HAND

Her calmness, which was not the stupor of grief, from this point
onwards shocked her friend and disturbed her enemy in the house.
The Rector could not but feel it a slight upon his dead brother and
an attitude most unbecoming to so young a widow; but Mrs. James
was made uncomfortable by an attitude for which she had not been
prepared. Whatever the girl’s faults may have been, she had never
been brazen. Why, then, was she brazen now? Why almost—yes,
indecent in her indifference? Mary proposed nothing, objected to
nothing; took no part in the funeral arrangements, answered no
letters, read none, allowed her sister-in-law entire control, sank
back, with evident contentment, to be the cipher in her own house,
which, of course, she ought to have been from the first. There was
something behind all this; Mrs. James was far too intelligent to
misread it. This did not mean that Mary was over-whelmed—by grief,
or shame, either; it did not mean that she felt herself in disgrace.
No. This was impudence—colossal.
The Rector, to whom this reading of the girl was propounded,
could not deny it colour. “She’s very young to have such troubles
upon her, and of course she’s still very ignorant. She can’t express
herself. I don’t at all agree with you, Constantia; but I own I should
have preferred to see her in tears.”
“Why should she cry, pray? She has all that she wants—a sure
income and her liberty. At least, that is what she supposes; but we
shall see.”
“You paint your devils so impossibly black, my dear,” said the
Rector, “that really they refute themselves. I am sorry to have to say
it, but you are incapable of being just to this poor girl. However, as I
own, tears had been a sign of grace.”
Certainly she shed no tears, that any one could see. She was
frequently in her room alone, and may have cried there. The Rector
made advances, by look, by gesture, even by words. He was not an
effusive man; would sooner have died than have invited anybody to
pray with him—but for all that he did put himself in her way, heart in
hand, so to speak—and when she gently disregarded him he felt
chilly.
She did not attend the funeral, nor did she choose, though she
was urged, to be present at the reading of the will. She told the
Rector, who pressed this duty upon her, that she couldn’t oblige him.
“Please don’t ask me to do that. I have nothing to expect—and if he
had left me anything I should have to think about it very seriously.
He took me from nothing; I brought him nothing; he has done more
for me, and allowed me to do more for my parents than I could ever
have asked—even of him. I make no claims at all, and have no
expectations. I have never thought about such things——”
“Naturally, my child, naturally not. But—after such a shock as this
—after the first pang of loss—it is wise to think of the future. You
had no settlement, you know.”
“How could I?” she asked simply. He smiled at the question.
“Well, my dear, well. Your parents might reasonably have looked
—my dear brother was very impulsive in some ways—I can’t doubt
but that he intended to make proper provision. But he kept his
affairs very much to himself—too much. However, at such a time—to
judge the beloved dead—! No, no. For the same reason I can’t press
you——”
“No—please do not,” she said, and turned to the window. He left
her.
The will, then, was read before the Rector and Mrs. James, Miss
Germain, and Miss Hester Germain, and produced its effect. It bore
the date of a month before the testator’s second marriage and was
expressed to be made in view of that coming ceremony, and to take
the place of any settlement. It left her Porchfield House in
Farlingbridge, “otherwise known as the Dowry House,” with all its
furniture and household gear, and three thousand pounds a year
charged upon his Southover estate “so long as she remain chaste
and unmarried.” Mr. Dockwra, solicitor, slurred his phrase, excusing
it. Mrs. James liked it extremely. In the case of remarriage, Mary was
to have five hundred pounds. That was all, said Mr. Dockwra, so far
as Mrs. Germain was concerned; and he only said this much because
he was asked by Mrs. James Germain if there was no further
reference to her. For the rest the deceased gave handsome legacies
to his sisters, though they were otherwise provided for, and liberal
remembrances to his servants—annuities calculated upon their years
of service; and referred to the fact that the Southover property and
the London property alike were in strict settlement upon his own
children, should he have any, and, failing them, upon his brother
James.
Mr. Dockwra then produced a small bundle of papers. “There was
a codicil,” he said, “which bore date the 26th of August—a week
before Mr. Germain’s wedding. By this document he left five hundred
a year to “my cousin Tristram Duplessis,” so long as he remained
unmarried.” Thus tersely expressed, the Rector started as if he had
been shot, and his wife compressed her lips.
“I think that I should explain,” said Mr. Dockwra, “that this codicil
was not drawn by me, and that I had no knowledge of its existence
until the day after Mr. Germain’s death. Mr. James Germain, however,
as executor, handed me then the sealed envelope containing it. That
envelope contained one other paper—a telegram, which (as it has no
obvious reference to the disposition) may have been put there by
oversight. I shall hand it now to Mr. Germain.”
The Rector took it, opened it, looked at it, and raised his
eyebrows. Presently he put it quietly on the table before him. Mrs.
James, without turning her head, read it. It was very short—
Middleham, Hill-street, Berkeley-square—Look out. Mrs. James
smiled at her thoughts—and presently left the room.
Mary must now be told what she had not cared to hear. The
Rector broke her the contents of the will but said nothing of the
codicil. He had not asked his wife the meaning of that second
document, and did not mean to. It pointed to a domestic mystery.
Without being a prude, all such matters were distasteful to him.
He was very kind, as he had always been. “You will be very
comfortably left, you see, Mary,” he said, “at any rate, let us say,
while you are looking about you.”
Mary had shown no more than a polite interest in his report.
Three thousand a year? Porchfield? She may have been dazed, but
she certainly was not dazzled. James Germain reflected to himself on
the ease with which one gets acclimatized. Little more than two
years ago this child was working hard for sixty pounds a year; now
she hears that she is secured three thousand—without moving a
muscle.
“I need not tell you,” he went on, “that your home is here or at
Southover for any length of time convenient to you. Indeed, I am
sure I might include the Rectory in my general invitation. We have
been so nearly related; I could not bear to think the tie severed by
my dear brother’s death. Apart from that, we have learned to love
each other, I hope. I shall always look upon you as one of us—if you
will let me; and your settlement at Porchfield will be a reason the
more to keep me at Southover.”
“That is very kind of you, Mr. Germain,” Mary said—but without
enthusiasm. After a few more efforts, the worthy man left her alone.
It was then Mrs. James’s turn. She came in, after knocking, with
the telegram in her hand.
“This, I think, belongs to you,” she said.
Mary took it, read it, and remembered. A quick flush of colour
showed that she did.
“Yes,” she said, “but it is of no importance now.” And she tore it
across.
But Mrs. James was not to be balked. “You must allow me to
explain its importance. It was found in the envelope containing the
codicil to my dear brother’s will—a codicil which he made within two
days of your receiving it.”
Mary, still looking out of the window, commented idly. “A codicil?
Was there a codicil? That meant that you changed your mind, didn’t
it?”
“In this case,” said Mrs. James, “it means, I think, that my dear
brother explained his mind. I thought that the Rector might have
informed you.”
“No,” said Mary. Mrs. James cleared her throat and began to
enjoy herself.
“By that he left five hundred a year to my cousin Tristram
Duplessis—so long as he remained unmarried.”
Mary was puzzled at first. She knew by the speaker’s tone that
she was in disgrace—and connected it with Duplessis at the mention
of his name. She stared at the bitterly incisive lady. “Mr. Duplessis—
five hundred—if he doesn’t marry? What has that to do with—?” She
stopped—her eyes widened and deepened—showed fathomless.
“Ah!” she said, and picked up the torn paper. She read the date,
August 24th. “What did you say was the date of the will?”
“It was a codicil,” said Mrs. James.
“The date, please, the date,” Mary asked her, fretfully.
“It was dated the 26th of August.”
Jinny’s birthday! Mary remembered it perfectly. He had had tea
with the two of them, and she had clung to him afterwards, with a
confession on the tip of her tongue. He had never been more loving
to her than on that afternoon—and he had Jinny’s telegram in his
pocket—in his breast pocket—while she had clung sobbing to his
breast! And he had left her that evening, full of love, as he had
seemed to be, and gone home and tied Tristram by the leg. Ah—so
he had known everything—always! Before that night at Exeter—he
had known it from the beginning.
She sat very still—the telegram in her lap—and her eyes cast
down, as she played idly with the pieces, lifting them up and letting
them fall. The triumphant foe could see nothing but her heavy
eyelids, and the fringe of her lashes curving upwards as they
brushed her cheeks. If she expected victory she was to be
disappointed.
“I am glad you sent him my telegram,” she said. “I am glad he
knew about Mr. Duplessis and me.”
Mrs. James lifted her head. “It was certainly advisable that he
should be told. Personally, I could not interfere. I told him nothing
that may have presented itself to me——”
“No,” said Mary, “of course not. It was no business of yours.” Mrs.
James jumped.
“It seems to me that it was very much a business of yours, if you
will forgive me.”
“It was,” Mary said. “And I told him all about it.”
Mrs. James started. “I told him,” Mary said, “on the night he
died. He quite understood.”
“It is horrible to me,” cried Mrs. James, “that he was kept in the
dark so long.”
“He wasn’t at all in the dark,” Mary said. “That is plain now. I
wish that I had known it before.”
“You may well say so. Apart from candour, apart from sincerity,
surely it is the sacred duty of a married woman to have no secrets
from her husband.”
Mary looked up. She had the eyes of a woman acquainted with
grief. “I am not a married woman,” she said. “I fancy that you must
know it.”
XVI
WINGS

The tale of Germain’s posthumous disposition of his chattels ran,


as such tales will, all about town, and lost nothing in the running.
Women took it complacently, after their kind. Of course it was odd;
and yet, in its way, was it not a tribute? One or two pretty young
wives told each other that it was touching; a Miss Lavender shed
tears. In the clubs they said plainly that Duplessis had been bought
off. Palmer Lovell, with his back to the fireplace, cried out in his
strident boy’s voice, “If that’s not compounding a felony, it’s
compounding a felon. But what the devil of a right has old Germain,
alive or dead, to whip his wife in public?” No clubman had an answer
to this. The best thing of all was said by Lord Kesteven in Paris:
“God be good to us, what Turks we all are! Here’s old Germain
taking the harem-key into the grave with him.”
That keen-faced old lord came to London and called on Mary in
Hill-street. He observed her pale in her black weeds, but with a
haunted kind of beauty upon her which she had never had before.
Her eyes were enormous, he said. She was very quiet in her manner,
seemed dazed, but not cowed—apprehensive, you might think. She
looked up at him in a mutely expectant way, as if she expected him
momentarily to hit her, and was too tired even to flinch at the
impending blow. He felt deeply for her—all sorts of things, and after
his manner, therefore, was more bluff and direct than usual. “Well,
my young friend, and what are you going to do with yourself? I
should advise you to get out of this. No woman can be expected to
stand it.”
She flushed at the bold attack, but did not avoid it. “I hear
nothing of what is being said. I am sure he did not mean to be
unkind. That is not like him. I was to blame.”
“I won’t talk about it, or I shall get angry. Cant—in a man’s will—
to disguise something worse, and nastier—pouf! Look here, my dear,
try France—try Paris. My sister Margaret de Guiche would like you to
pay her a visit. She said so. She’s alone, and you need see nobody.
De Guiche is in Petersburg. You couldn’t have a better dueña than
Margaret. It will be a kindness to her—and a kindness to me. I wish
you’d think of it.”
She listened with hanging head, and veiled eyes. Her eyelids,
always heavy, seemed now as if they were of intolerable weight. She
watched her twisting fingers as she thanked him for the proposal.
She would think of it, she told him—she had everything to think of.
“I know that very well,” Kesteven said; “but there are some
things which I hope you need not consider. One of them is the great
regard I have for you.”
Oh, yes, she was sure of that. He had shown her so much
kindness.
“I’m glad to hear it,” he continued; “and I’ll go as far as this. If
you decide to renounce your legacy—on reflection—I should claim
the privilege of helping you to do it. I can hardly go further—but so
far I am ready to go. Remember that. Remember that I am allowed
to call myself your friend. Remember, if you choose, that I am five-
and-sixty, and take heart—if you need heart.”
It was clear what was implied in this speech; but she did not feel
equal to quieting the anxiety which underlay it. She made no
remark.
“At any rate,” said his lordship, “I tell you that you may command
the Hôtel de Guiche. Margaret may be trusted—and perhaps I need
not add that you may trust me, too.” But he couldn’t get her to say
more than she would think of it, so took his leave. He kissed her
hand.
So far she had not seen Duplessis, nor heard from him; but the
sense that an interview with him was impending, was, as it were,
swinging like a sword over her head, fretted her nerves so badly that
she was incapable of thinking what she could say to him when he
came to her—as of course he would—with an offer of instant
marriage. That would be, in his view, the only possible answer to the
public affront he had received. But as the days went on and he
made no sign she began to wonder dimly whether, after all, she
might not escape—and from such faint sighings thrown out into the
vague she came by degrees to hopes—and from hopes to plans and
shifts.
Everything in town conspired together to make her position
impossible. The chill reserve of Mrs. James—whose frozen civility
was worse than any rebuke; the letters of her parents from
Blackheath, kind, repining, half-informed letters which said in effect,
We don’t know what is being cried against you, but be sure that we
are on your side; and the terrible letters of Jinny (almost Mrs.
Podmore by now, and vigorously on the side of decorum)—“the
disgrace which has been cast upon our family . . . your unfortunate
liaison, . . . One can only hope that you will let them be a warning,
child. . . . Let us be thankful that things are no worse . . .”—all this
made the poor girl so self-conscious that she could hardly lift her
head. She thought that the very servants were judging her—as, no
doubt, they were; she felt beaten to the earth; and the fund of
common-sense, the fund of charity, which she had at her call—
through mere panic—suspended payment.
If she had been left to herself she would have borne her husband
no grudge for seeking to tie her publicly to his name. She would
have pitied, not blamed him, for supposing that three thousand or
thirty thousand a year could have held her. And certainly that
midnight confession absolved her in her own conscience. If she had
looked back upon her dealings with Duplessis it would have been to
see what a little fool she had been—to blush at her ignorance, not at
her shame. But now her world insisted on her disgrace; she was
made to stand in a sheet like a Jane Shore; the straight, clinging,
disgraceful robe imprisoned her body and soul. She felt that she
must die if she stayed where she was, a public mock; but until
Duplessis delayed so obviously his coming she had felt bound in
honour to see him.
To be just to Duplessis, he kept himself away by violence,
obeying an instinct—which was a true one. He had no doubt but that
she would marry him now—he could not for the life of him see how
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like